Re: Query much slower when run from postgres function
От
fche@redhat.com (Frank Ch. Eigler)
Тема
Re: Query much slower when run from postgres function
Дата
Msg-id
y0mr615785o.fsf@ton.toronto.redhat.com
Ответ на
Список
Дерево обсуждения
Query much slower when run from postgres function Mario Splivalo <mario.splivalo@megafon.hr>
Re: Query much slower when run from postgres function Tom Lane <tgl@sss.pgh.pa.us>
Re: Query much slower when run from postgres function Mario Splivalo <mario.splivalo@megafon.hr>
Re: Query much slower when run from postgres function Tom Lane <tgl@sss.pgh.pa.us>
Re: Query much slower when run from postgres function Mario Splivalo <mario.splivalo@megafon.hr>
Re: Query much slower when run from postgres function Tom Lane <tgl@sss.pgh.pa.us>
Re: Query much slower when run from postgres function Guillaume Cottenceau <gc@mnc.ch>
Re: [JDBC] Query much slower when run from postgres
function Guillaume Smet <guillaume.smet@gmail.com>
Re: [JDBC] Query much slower when run from postgres function Tom Lane <tgl@sss.pgh.pa.us>
Re: [JDBC] Query much slower when run from postgres
function Dave Cramer <pg@fastcrypt.com>
Re: [JDBC] Query much slower when run from postgres function James Mansion <james@mansionfamily.plus.com>
Re: [JDBC] Query much slower when run from postgres function Andreas Wenk <a.wenk@netzmeister-st-pauli.de>
Re: [JDBC] Query much slower when run from postgres
function Scott Carey <scott@richrelevance.com>
Re: Query much slower when run from postgres function Mario Splivalo <mario.splivalo@megafon.hr>
Re: Query much slower when run from postgres function fche@redhat.com (Frank Ch. Eigler)
Re: Query much slower when run from postgres function Tom Lane <tgl@sss.pgh.pa.us>
Re: Query much slower when run from postgres function decibel <decibel@decibel.org>
Re: Query much slower when run from postgres function Віталій Тимчишин <tivv00@gmail.com>
Re: Query much slower when run from postgres function decibel <decibel@decibel.org>
Tom Lane writes: > Mario Splivalo writes: >> Now I'm confused, why is 'sql' function much slower than 'direct' SELECT? > > Usually the reason for this is that the planner chooses a different plan > when it has knowledge of the particular value you are searching for than > when it does not. I suppose 'service_id' has a very skewed distribution > and you are looking for an uncommon value? For a prepared statement, could the planner produce *several* plans, if it guesses great sensitivity to the parameter values? Then it could choose amongst them at run time. - FChE
В списке pgsql-performance по дате отправления