pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Віталій Тимчишин <tivv00@gmail.com>
Cc: Richard Huxton <dev@archonet.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: PostgreSQL OR performance
Date: Sat, 15 Nov 2008 12:07:31 -0500
Message-ID: <7426.1226768851@sss.pgh.pa.us> (raw)
In-Reply-To: <331e40660811150557s50e54c54m974645e31e30a612@mail.gmail.com>
References: <331e40660811050312u552cab53ifa88e493e1c4f7ac@mail.gmail.com>
	<1225902700.1432.53.camel@jdavis>
	<331e40660811060246m51df553egd4e2ba91f08d1434@mail.gmail.com>
	<29e3942f0811060426k5fe34b1av401a2dba62e4ae3c@mail.gmail.com>
	<331e40660811060833l49bf837em41ca88d4b2061ea1@mail.gmail.com>
	<49131ED5.80307@archonet.com>
	<331e40660811060937q460e6f9fvf336455200d31f56@mail.gmail.com>
	<331e40660811070114rd70cf0dy194020a9f9ea8802@mail.gmail.com>
	<49141C5E.2010404@archonet.com>
	<331e40660811150557s50e54c54m974645e31e30a612@mail.gmail.com>

"=?ISO-8859-5?B?svbi0Nv22SDC2Nzn2OjY3Q==?=" <tivv00@gmail.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



view thread (16+ messages)  latest in thread

Message-ID: <7426.1226768851@sss.pgh.pa.us>
Permalink:  ../7426.1226768851@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/7426.1226768851@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: tgl@sss.pgh.pa.us, tivv00@gmail.com, dev@archonet.com
  Subject: Re: PostgreSQL OR performance
  In-Reply-To: <7426.1226768851@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox