Bruce Momjian <br...@momjian.us> writes: > As part of my research on the parsing/planning behavior of PREPARE, I > found a surprising behavior --- a WHERE clause that is 50% restrictive > is using an index. I thought only <10% restrictions used indexes.
There's no such hard-and-fast rule. The cost estimate break point depends greatly on the index order correlation (which is 100% in your example), as well as some other factors like the index size versus effective_cache_size. For randomly-ordered data I believe the cutover is actually well below 10%. regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers