Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower
От
David Rowley
Тема
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower
Дата
Msg-id
CAApHDvpYPKZxf=zqtjKhR9W8yKn0R2ojyoMkC=zcmVv9M4FSyQ@mail.gmail.com
Ответ на
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower (Andres Freund)
Список
Дерево обсуждения
BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower PG Bug reporting form <noreply@postgresql.org>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower David Rowley <dgrowleyml@gmail.com>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower David Rowley <dgrowleyml@gmail.com>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower David Rowley <dgrowleyml@gmail.com>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower Richard Guo <guofenglinux@gmail.com>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower Richard Guo <guofenglinux@gmail.com>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower David Rowley <dgrowleyml@gmail.com>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower Richard Guo <guofenglinux@gmail.com>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower David Rowley <dgrowleyml@gmail.com>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower Richard Guo <guofenglinux@gmail.com>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower David Rowley <dgrowleyml@gmail.com>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower Richard Guo <guofenglinux@gmail.com>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower Andrei Lepikhov <a.lepikhov@postgrespro.ru>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower Richard Guo <guofenglinux@gmail.com>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower David Rowley <dgrowleyml@gmail.com>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower Richard Guo <guofenglinux@gmail.com>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower Richard Guo <guofenglinux@gmail.com>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower David Rowley <dgrowleyml@gmail.com>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower "David G. Johnston" <david.g.johnston@gmail.com>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower Andres Freund <andres@anarazel.de>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower Andres Freund <andres@anarazel.de>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower Tom Lane <tgl@sss.pgh.pa.us>
Re: BUG #17540: Prepared statement: PG switches to a generic query plan which is consistently much slower David Rowley <dgrowleyml@gmail.com>
On Thu, 7 Jul 2022 at 12:46, Andres Freund wrote: > I think the cost for the slow plan being so much cheaper can almost be > qualified as bug. > > The slow plan seems pretty nonsensical to me. ISTM that something in the > costing there is at least almost broken. I forgot to mention what the "generic problem" is when I posted my reply. I should have mentioned that this is how we cost LIMIT. We assume that we'll find the LIMIT 1 row after incurring the scan cost multiplied by (1 / 259201). For the plan with WHERE timestamp >= $1, the seqscan plan looks pretty cheap for fetching DEFAULT_INEQ_SEL of the 259201 rows considering the LIMIT multiples the cost of the scan by (1 / 86400). David
В списке pgsql-bugs по дате отправления
От: Andres Freund
Дата:
От: Tom Lane
Дата: