Subject Re: [firebird-support] hiding some records
Author Martijn Tonies
> at the database level make a view which has the clause "where active='Y'"
and choose the view. or alternatively make a stored procedure which serves
the same function, and choose from the stored procedure. otherwise.... just
be careful! :-)
>

Mind you, with a VIEW, if you use the view in a query that joins
with the view, for example, the query plan can be adjusted and
the view select expression will more-or-less be used "in line".

With a Stored Procedure, this will never happen! What does
this mean? Well, that a:

select * from my_selectable_procedure where id = 1

will read ALL ROWS in the table and only filters afterwards.

Martijn Tonies
Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle &
MS SQL Server
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com