Subject IN clause, help.
Author William Gonz´┐Żles S.
Hello all.
I have a query with IN clause and always it has many
elements:

select * from DOCUMENTS where DOCUMENT_ID in (
'1000',
'1001',
'1002',
'3001',
'3002'
...
--An so on, this could has 1500 entries.
)

DOCUMENT_ID is PK and DOCUMENTS table has 25000
records, also I have this query inside a loop,
becasuse the IN clause limitation (1500 in FB 1.5) so,
sometimes this query executes more than 1 time; I am
thinking to change it: reading all table and compare
DOCUMENT_ID iterating in each record.
What option is the best? (I need more speed in
queries) can I keep the IN clause?

FB 2 has this IN clause limitation ?

Thansk in advance.
William GS

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com