On Sat, 2007-09-01 at 11:58 +0800, RaghavendraK 70574 wrote: > Hi, > > In one of the slides "http://www.sqlite.org/php2004/page-052.html" > it is stated, "OR will make DBEngine not to use Indexes" and IN will > make DBEngine use > indexes" > > I could not understand the rationale abt this. Can u explain?
The point is (was) that if you have a table like this: CREATE TABLE abc(a PRIMARY KEY, b, c); Then the first query uses the index on a, the second does (did) not: SELECT * FROM abc WHERE a IN ('hello', 'world'); SELECT * FROM abc WHERE a = 'hello' OR a = 'world'; However, since those slides were written SQLite has been updated so that queries of the second form are internally transformed to the first, and therefore may use an index. Dan. > > regards > ragha > > ****************************************************************************************** > This email and its attachments contain confidential information from HUAWEI, > which is intended only for the person or entity whose address is listed > above. Any use of the information contained herein in any way (including, but > not limited to, total or partial disclosure, reproduction, or dissemination) > by persons other than the intended recipient(s) is prohibited. If you receive > this e-mail in error, please notify the sender by phone or email immediately > and delete it! > > ***************************************************************************************** > > ----------------------------------------------------------------------------- > To unsubscribe, send email to [EMAIL PROTECTED] > ----------------------------------------------------------------------------- > ----------------------------------------------------------------------------- To unsubscribe, send email to [EMAIL PROTECTED] -----------------------------------------------------------------------------