Re: PostgreSQL OR performance

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Віталій Тимчишин <tivv00(at)gmail(dot)com>
Cc: "Richard Huxton" <dev(at)archonet(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: PostgreSQL OR performance
Date: 2008-11-15 17:07:31
Message-ID: 7426.1226768851@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

"=?ISO-8859-5?B?svbi0Nv22SDC2Nzn2OjY3Q==?=" <tivv00(at)gmail(dot)com> writes:
> I am not. I can't see how materialize can multiply number of rows it gets
> from sort by 100.

Is it the right-hand input of a merge join? If so you're looking at
mark/restore rescans, ie, repeated fetches of the same tuples. There
must be a huge number of duplicate join keys in that relation to make
for such an increase though. Normally the planner avoids putting a
table with lots of duplicates as the RHS of a merge, but if it doesn't
have good statistics for the join key then it might not realize the
problem.

regards, tom lane

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message PFC 2008-11-16 14:50:28 Re: slow full table update
Previous Message Віталій Тимчишин 2008-11-15 13:57:03 Re: PostgreSQL OR performance