pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: ktm@rice.edu <ktm@rice.edu>
To: Willy-Bas Loos <willybas@gmail.com>
Cc: Jeff Janes <jeff.janes@gmail.com>
Cc: Scott Marlowe <scott.marlowe@gmail.com>
Cc: pgsql-performance@postgresql.org <pgsql-performance@postgresql.org>
Subject: Re: seqscan for 100 out of 3M rows, index present
Date: Wed, 26 Jun 2013 15:48:04 -0500
Message-ID: <20130626204804.GC3264@aart.rice.edu> (raw)
In-Reply-To: <CAHnozTiLdn=1XH7X4XyUoD3e=n2sXt=RUCZ3KWr-f6W8WK5SFQ@mail.gmail.com>
References: <CAHnozTgJQq8vPns_WpS+7i=JrQm9zaCyQ_-eKD2HzCibfSZ1Qw@mail.gmail.com>
	<CAOR=d=1gosvUcpxcqEk39ASuxPS2ngBmuP+V+rPjvSJui3=6Rw@mail.gmail.com>
	<CAMkU=1xzMULy-Ag=h_XK12MhnDtX=qus5YuiO1UV_TQ-c=dL9A@mail.gmail.com>
	<CAHnozTiLdn=1XH7X4XyUoD3e=n2sXt=RUCZ3KWr-f6W8WK5SFQ@mail.gmail.com>
List-Unsubscribe:  <mailto:majordomo@postgresql.org?body=unsub%20pgsql-performance>

On Wed, Jun 26, 2013 at 10:36:10PM +0200, Willy-Bas Loos wrote:
> On Wed, Jun 26, 2013 at 10:31 PM, Jeff Janes <jeff.janes@gmail.com> wrote:
> 
> >
> > Why is it retrieving 3.1 million, when it only needs 17?
> >
> >
> > that's because of the sequential scan, it reads all the data.
> 
> cheers,
> 
> willy-bas

Well, the two plans timings were pretty close together. Maybe your
cost model is off. Try adjusting the various cost parameters to
favor random I/O more.

Regards,
Ken


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance



view thread (16+ messages)  latest in thread

Message-ID: <20130626204804.GC3264@aart.rice.edu>
Permalink:  ../20130626204804.GC3264@aart.rice.edu/
Also on:    postgresql.org/message-id/20130626204804.GC3264@aart.rice.edu

 · 

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: ktm@rice.edu, willybas@gmail.com, jeff.janes@gmail.com, scott.marlowe@gmail.com
  Subject: Re: seqscan for 100 out of 3M rows, index present
  In-Reply-To: <20130626204804.GC3264@aart.rice.edu>

* 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