pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andrew McMillan <andrew@catalyst.net.nz>
To: Jan Aerts <jan.aerts@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: index on custom function; explain
Date: Fri, 07 Oct 2005 07:50:01 +1300
Message-ID: <1128624601.17294.86.camel@lamb.mcmillan.net.nz> (raw)
In-Reply-To: <1128420628.326795.158780@g47g2000cwa.googlegroups.com>
References: <1128352451.312090.37640@g44g2000cwa.googlegroups.com>
	<1128420628.326795.158780@g47g2000cwa.googlegroups.com>

On Tue, 2005-10-04 at 03:10 -0700, Jan Aerts wrote:
> Some additional thoughts: what appears to take the most time (i.e.
> account for the highest cost in the explain), is _not_ running the
> function itself (cost=0.00..0.01), but comparing the result from that
> function with the name1 column in the mappings table
> (cost=0.00..35935.05). Am I right? (See EXPLAIN in previous post.) If
> so: that's pretty strange, because the name1-column in the mappings
> table is indexed...

35935.05 is for the loop, 0.01 is for the operation within the loop.

What version of PostgreSQL is this?  Some old versions were not good at
handling the IN ( ... ) clause.

Also, PostgreSQL doesn't always do a wonderful job of considering the
activities of a function into the design of the query plans.  Sometimes
this can be a blessing, but not in this case.

Cheers,
					Andrew.

-------------------------------------------------------------------------
Andrew @ Catalyst .Net .NZ  Ltd,  PO Box 11-053, Manners St,  Wellington
WEB: http://catalyst.net.nz/            PHYS: Level 2, 150-154 Willis St
DDI: +64(4)803-2201      MOB: +64(272)DEBIAN      OFFICE: +64(4)499-2267
It is truth which you cannot contradict; you can without any difficulty
                      contradict Socrates. - Plato

-------------------------------------------------------------------------

Attachments:

  signature.asc (application/pgp-signature, 188B) download

view thread (4+ messages)

Message-ID: <1128624601.17294.86.camel@lamb.mcmillan.net.nz>
Permalink:  ../1128624601.17294.86.camel@lamb.mcmillan.net.nz/
Also on:    postgresql.org/message-id/1128624601.17294.86.camel@lamb.mcmillan.net.nz

 · 

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: andrew@catalyst.net.nz, jan.aerts@gmail.com
  Subject: Re: index on custom function; explain
  In-Reply-To: <1128624601.17294.86.camel@lamb.mcmillan.net.nz>

* 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