Re: [PERFORM] Slow query: bitmap scan troubles

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PERFORM] Slow query: bitmap scan troubles
Дата
Msg-id 24605.1358186197@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PERFORM] Slow query: bitmap scan troubles  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: [PERFORM] Slow query: bitmap scan troubles  (Bruce Momjian <bruce@momjian.us>)
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Mon, Jan 14, 2013 at 12:23 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> The old code definitely had an unreasonably large charge for indexes
>> exceeding 1e8 or so tuples.  This wouldn't matter that much for simple
>> single-table lookup queries, but I could easily see it putting the
>> kibosh on uses of an index on the inside of a nestloop.

> The reported behavior was that the planner would prefer to
> sequential-scan the table rather than use the index, even if
> enable_seqscan=off.  I'm not sure what the query looked like, but it
> could have been something best implemented as a nested loop w/inner
> index-scan.

Remember also that "enable_seqscan=off" merely adds 1e10 to the
estimated cost of seqscans.  For sufficiently large tables this is not
exactly a hard disable, just a thumb on the scales.  But I don't know
what your definition of "extremely large indexes" is.
        regards, tom lane



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: Re: json api WIP patch
Следующее
От: Tom Lane
Дата:
Сообщение: Re: bugfix: --echo-hidden is not supported by \sf statements