Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> SQL Filtering
I have a problem, that I'm sure someone has had to solve before. I have a
client table and I want to allow users access to only certain classes of
clients. In my example I have 'OrdinaryClients' and 'ImportantClients'. If
I want to filter a query so that certain users can only see
'OrdinaryClients' what's the best way to do this.
This is what I am currently doing, but the queries are very slow as the
table sizes increase. When an index is added to Client.clientNumber it's
not being used if the resultset returned from Userprofile is larger than
around 10 to12 clients. Any ideas?
Table:
Client
. . .
UserProfile
. . .
User
. . .
User
UserProfile
Client
select clientName from Client where client.clientNumber in (select clientNumber from userProfile where profileName = 'OrdinaryClients') Received on Fri Aug 02 2002 - 08:25:18 CDT
![]() |
![]() |