pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Steve Atkins <steve@blighty.com>
To: pgsql-performance@postgresql.org
Subject: Re: faster search
Date: Fri, 10 Jun 2005 13:12:40 -0700
Message-ID: <20050610201240.GA9822@gp.word-to-the-wise.com> (raw)
In-Reply-To: <20050610132812.R94573@vbp2.vbp2.com>
References: <20050610132812.R94573@vbp2.vbp2.com>

On Fri, Jun 10, 2005 at 01:45:05PM -0400, Clark Slater wrote:
> Hi-
> 
> Would someone please enlighten me as
> to why I'm not seeing a faster execution
> time on the simple scenario below?

Because you need to extract a huge number of rows via a seqscan, sort
them and then throw them away, I think.

> explain analyze select * from test where productlistid=3 and typeid=9 
> order by partnumber limit 15;

Create an index on (productlistid, typeid, partnumber) then

  select * from test where productlistid=3 and typeid=9
   order by productlistid, typeid, partnumber LIMIT 15;

?

Cheers,
  Steve



view thread (15+ messages)  latest in thread

Message-ID: <20050610201240.GA9822@gp.word-to-the-wise.com>
Permalink:  ../20050610201240.GA9822@gp.word-to-the-wise.com/
Also on:    postgresql.org/message-id/20050610201240.GA9822@gp.word-to-the-wise.com

 · 

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: steve@blighty.com
  Subject: Re: faster search
  In-Reply-To: <20050610201240.GA9822@gp.word-to-the-wise.com>

* 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