t1 is a huge table. The query does not use the index when I do (select
* from t1_view where id='123'). However if I create the view in
following way the performance is much better (note: I use 'select 1 from
security' instead of 'select count(*) from security').

But the problem is if my user name is not in the security table, I got
no rows returned when I do (select * from t1_view) instead of just the
id field is blocked.

Does any one know if it's possible to return a value even a null value
from (select 1 from security where user_name=user) instead of no rows
returned when the user is not in the security table? or do you have a
better way to block a field?