Re: same plan, add 1 condition, 1900x slower

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: same plan, add 1 condition, 1900x slower
Дата
Msg-id
18883.1131723210@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
same plan, add 1 condition, 1900x slower Mitch Skinner <mitch@egcrc.net>
Re: same plan, add 1 condition, 1900x slower Tom Lane <tgl@sss.pgh.pa.us>
Re: same plan, add 1 condition, 1900x slower Mitch Skinner <mitch@egcrc.net>
Re: same plan, add 1 condition, 1900x slower Tom Lane <tgl@sss.pgh.pa.us>
Re: same plan, add 1 condition, 1900x slower Richard Huxton <dev@archonet.com>
Re: same plan, add 1 condition, 1900x slower Mitch Skinner <mitch@egcrc.net>
Re: same plan, add 1 condition, 1900x slower Tom Lane <tgl@sss.pgh.pa.us>
Re: same plan, add 1 condition, 1900x slower Mitch Skinner <mitch@egcrc.net>
Re: same plan, add 1 condition, 1900x slower Tom Lane <tgl@sss.pgh.pa.us>
Re: same plan, add 1 condition, 1900x slower Tom Lane <tgl@sss.pgh.pa.us>
Re: same plan, add 1 condition, 1900x slower Mitchell Skinner <mitch@egcrc.net>
Re: same plan, add 1 condition, 1900x slower Tom Lane <tgl@sss.pgh.pa.us>
Mitch Skinner  writes:
> On Fri, 2005-11-11 at 09:17 -0500, Tom Lane wrote:
>> Please don't, actually, until we understand what's going on.

> Ack, I was the middle of the vacuum full already when I got this.

Given what you said about no deletions or updates, the vacuum should
have no effect anyway, so don't panic.

> I put up some files at: http://arctur.us/pgsql/

Great, I'll take a look ...

> Pardon my ignorance, but do the visibility check and the check of the
> condition happen at different stages of execution?  Would it end up
> checking the condition for all 15M rows, but only checking visibility
> for the 1200 rows that come back from the join?

No, the visibility check happens first.  The timing does seem consistent
with the idea that the comparison is being done at all 15M rows, but
your other EXPLAIN shows that only 2K rows are actually retrieved, which
presumably is because the merge doesn't need the rest.  (Merge will stop
scanning either input when it runs out of rows on the other side; so
this sort of plan is very fast if the range of keys on one side is
smaller than the range on the other.  The numbers from the no-comparison
EXPLAIN ANALYZE indicate that that is happening for your case.)  So the
comparison should happen for at most 2K rows too.

			regards, tom lane
В списке pgsql-performance по дате отправления
От: Mitch Skinner
Дата:
От: Tom Lane
Дата:
FAQ