pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Greg Stark <gsstark@mit.edu>
To: Lawrence Cohan <LCohan@web.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: Postgres not using indexes
Date: Thu, 31 Mar 2011 17:33:59 -0500
Message-ID: <4D94BB07020000250003C09F@gw.wicourts.gov> (raw)
In-Reply-To: <AANLkTikniFOL=SN1-xdWSJ+TrOmiN4xGxPqZSXd3yyVP@mail.gmail.com>
References: <965AA5440EAC094E9F722519E285ACEDAC5E66A53D@WWCEXCHANGE.web.web.com>
	<4D9317D3020000250003BF7B@gw.wicourts.gov>
	<965AA5440EAC094E9F722519E285ACEDAC5E66A556@WWCEXCHANGE.web.web.com>
	<4D9322E8020000250003BF8C@gw.wicourts.gov>
	<965AA5440EAC094E9F722519E285ACEDAC5E66A55F@WWCEXCHANGE.web.web.com>
	<AANLkTikniFOL=SN1-xdWSJ+TrOmiN4xGxPqZSXd3yyVP@mail.gmail.com>

Greg Stark <gsstark@mit.edu> wrote:
 
> your query does require reading all the data.
 
Huh?  It requires reading all the data from at least *one* of the
tables.  I could conceivably be faster to read all the data from the
table with 23,980 rows and randomly pick out the necessary 33,768
rows from the table with 33,909,690 rows using the
idx_order_items_order_id index.  That seems like it might be faster.
 
-Kevin



view thread (23+ messages)  latest in thread

Message-ID: <4D94BB07020000250003C09F@gw.wicourts.gov>
Permalink:  ../4D94BB07020000250003C09F@gw.wicourts.gov/
Also on:    postgresql.org/message-id/4D94BB07020000250003C09F@gw.wicourts.gov

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: Kevin.Grittner@wicourts.gov, gsstark@mit.edu, LCohan@web.com
  Subject: Re: Postgres not using indexes
  In-Reply-To: <4D94BB07020000250003C09F@gw.wicourts.gov>
  References: <965AA5440EAC094E9F722519E285ACEDAC5E66A53D@WWCEXCHANGE.web.web.com> <4D9317D3020000250003BF7B@gw.wicourts.gov> <965AA5440EAC094E9F722519E285ACEDAC5E66A556@WWCEXCHANGE.web.web.com> <4D9322E8020000250003BF8C@gw.wicourts.gov> <965AA5440EAC094E9F722519E285ACEDAC5E66A55F@WWCEXCHANGE.web.web.com> <AANLkTikniFOL=SN1-xdWSJ+TrOmiN4xGxPqZSXd3yyVP@mail.gmail.com> <4D94BB07020000250003C09F@gw.wicourts.gov>

* 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