pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Craig Ringer <craig@postnewspapers.com.au>
To: Luigi N. Puleio <npuleio@rocketmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: EXPLAIN detail
Date: Wed, 09 Apr 2008 23:28:51 +0800
Message-ID: <47FCE0B3.3040307@postnewspapers.com.au> (raw)
In-Reply-To: <981759.47577.qm@web33504.mail.mud.yahoo.com>
References: <981759.47577.qm@web33504.mail.mud.yahoo.com>

Luigi N. Puleio wrote:
>> If for some reason you cannot do that, please at least include the data
>> type of the primary key and all fields involved in the query, as well as
>> a list of all the indexes on both tables.
If you won't show people on the list your table definitions, or at least 
the information shown above, then it's less likely that anybody can help 
you or will spend the time trying to help you.

Personally I think you may need some functional/cast, and possibly 
composite, indexes to avoid the looping sequential scan as I said 
before. However, that's guesswork without some more information as 
repeatedly stated and requested. I'm not going to bother replying to any 
further mail just to say so again.


Try reading the documentation chapter about indexes:

http://www.postgresql.org/docs/current/static/indexes.html

and about query optimisation:

http://www.postgresql.org/docs/current/static/performance-tips.html

then experiment with various indexes to see what works best. Think about 
the data types. Remember that you can build an index on a cast of a 
field, on multiple fields, on function calls, or basically any other 
simple expression or expressions, but that complex indexes will cost 
more to build and maintain and might be bigger (and thus slower to search).


Anyway, I'm done.

--
Craig Ringer



view thread (12+ messages)  latest in thread

Message-ID: <47FCE0B3.3040307@postnewspapers.com.au>
Permalink:  ../47FCE0B3.3040307@postnewspapers.com.au/
Also on:    postgresql.org/message-id/47FCE0B3.3040307@postnewspapers.com.au

 · 

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: craig@postnewspapers.com.au, npuleio@rocketmail.com
  Subject: Re: EXPLAIN detail
  In-Reply-To: <47FCE0B3.3040307@postnewspapers.com.au>

* 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