pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Steinar H. Gunderson <sgunderson@bigfoot.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Materializing a sequential scan
Date: Wed, 26 Oct 2005 19:53:02 -0400
Message-ID: <12708.1130370782@sss.pgh.pa.us> (raw)
In-Reply-To: <20051026232219.GA6390@uio.no>
References: <20051019174544.GA32303@samfundet.no>
	<20051026213730.GA2295@uio.no>
	<12333.1130367975@sss.pgh.pa.us>
	<20051026232219.GA6390@uio.no>

"Steinar H. Gunderson" <sgunderson@bigfoot.com> writes:
> On Wed, Oct 26, 2005 at 07:06:15PM -0400, Tom Lane wrote:
>> AFAICS, subplan_is_hashable() is testing the same conditions in 7.4 and
>> HEAD, so this isn't clear.  Want to step through it and see where it's
>> deciding not to hash?

> (gdb) print opid 
> $3 = 2373

I don't think you're getting a correct reading for optup, but OID
2373 is timestamp = date:

regression=# select * from pg_operator where oid = 2373;
 oprname | oprnamespace | oprowner | oprkind | oprcanhash | oprleft | oprright | oprresult | oprcom | oprnegate | oprlsortop | oprrsortop | oprltcmpop | oprgtcmpop |      oprcode      | oprrest |  oprjoin
---------+--------------+----------+---------+------------+---------+----------+-----------+--------+-----------+------------+------------+------------+------------+-------------------+---------+-----------
 =       |           11 |       10 | b       | f          |    1114 |     1082 |        16 |   2347 |      2376 |       2062 |       1095 |       2371 |       2375 | timestamp_eq_date | eqsel   | eqjoinsel
(1 row)

which is marked not hashable, quite correctly since the input datatypes
aren't even the same.

My recollection is that there was no such operator in 7.4; probably in
7.4 the IN ended up using timestamp = timestamp which is hashable.

What's not clear though is why you're getting that operator --- aren't
both sides of the IN of type "date"?

			regards, tom lane



view thread (13+ messages)  latest in thread

Message-ID: <12708.1130370782@sss.pgh.pa.us>
Permalink:  ../12708.1130370782@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/12708.1130370782@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, sgunderson@bigfoot.com
  Subject: Re: Materializing a sequential scan
  In-Reply-To: <12708.1130370782@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