Skip site navigation (1) Skip section navigation (2)

Re: Postgres not using indexes

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Greg Stark" <gsstark(at)mit(dot)edu>,"Lawrence Cohan" <LCohan(at)web(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: Postgres not using indexes
Date: 2011-03-31 22:33:59
Message-ID: 4D94BB07020000250003C09F@gw.wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-bugs
Greg Stark <gsstark(at)mit(dot)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

In response to

Responses

pgsql-bugs by date

Next:From: Raphael GiovaniniDate: 2011-04-01 01:50:34
Subject: default password for user postgres
Previous:From: Kris JurkaDate: 2011-03-31 19:45:43
Subject: Re: BUG #5961: JDBC Driver acceptURL does not check 'jdbc:postgresql:'

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group