Re: plpgsql plan cache

Поиск
Список
Период
Сортировка
Искать
От
Pierre C
Тема
Re: plpgsql plan cache
Дата
Msg-id
op.u8jur4ndeorkce@localhost
Ответ на
Re: plpgsql plan cache (Joel Jacobson)
Список
Дерево обсуждения
plpgsql plan cache Joel Jacobson <joel@gluefinance.com>
Re: plpgsql plan cache "Pierre C" <lists@peufeu.com>
Re: plpgsql plan cache Joel Jacobson <joel@gluefinance.com>
Re: plpgsql plan cache Tom Lane <tgl@sss.pgh.pa.us>
Re: plpgsql plan cache Nikolas Everett <nik9000@gmail.com>
Re: plpgsql plan cache Joel Jacobson <joel@gluefinance.com>
Re: plpgsql plan cache "Pierre C" <lists@peufeu.com>

Actually, planner was smart in using a bitmap index scan in the prepared  
query. Suppose you later EXECUTE that canned plan with a date range which  
covers say half of the table : the indexscan would be a pretty bad choice  
since it would have to access half the rows in the table in index order,  
which is potentially random disk IO. Bitmap Index Scan is slower in your  
high-selectivity case, but it can withstand much more abuse on the  
parameters.

PG supports the quite clever syntax of EXECUTE 'blah' USING params, you  
don't even need to mess with quoting.
В списке pgsql-performance по дате отправления
От: Nikolas Everett
Дата:
Сообщение: Re: plpgsql plan cache
От: Joel Jacobson
Дата:
Сообщение: Re: plpgsql plan cache
FAQ