Tom Lane <[EMAIL PROTECTED]> writes: > Greg Stark <[EMAIL PROTECTED]> writes: > > I would fear queries like > > > SELECT * from tab WHERE x IN (1,2,3) LIMIT 1 > > > Which ought to be instantaneous would become potentially slow. > > Why? They certainly wouldn't be any slower than they are now.
Well currently they get rewritten to use OR which does a single index scan which I assumed returned rows as soon as it finds them like it does for regular range lookup index scans. Is that assumption wrong? The bitmap scan has to traverse all the index entries for matching records before it can fetch the first record. So it wouldn't be a fast-start plan. Not as bad as performing a sort step or anything like that of course. -- greg ---------------------------(end of broadcast)--------------------------- TIP 1: if posting/reading through Usenet, please send an appropriate subscribe-nomail command to [EMAIL PROTECTED] so that your message can get through to the mailing list cleanly