Re: Seq Scan vs Index on Identical Tables in Two Different Databases

From: bricklen <bricklen(at)gmail(dot)com>
To: Ellen Rothman <erothman(at)datalinedata(dot)com>
Cc: "pgsql-performance(at)postgresql(dot)org" <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Seq Scan vs Index on Identical Tables in Two Different Databases
Date: 2013-07-17 20:11:42
Message-ID: CAGrpgQ9_8CD6JZN53sBMye9WXv6pOQOBvYfAV0H3Xo_s482x1Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Wed, Jul 17, 2013 at 12:50 PM, Ellen Rothman
<erothman(at)datalinedata(dot)com>wrote:

> I have the same table definition in two different databases on the same
> computer. When I explain a simple query in both of them, one database uses
> a sequence scan and the other uses an index scan. If I try to run the Seq
> Scan version without the where clause restricting the value of uniqueid, it
> uses all of the memory on my computer and never completes. ****
>
> ** **
>
> How can I get the Seq Scan version to use an index scan?
>

Did you run "ANALYZE your-table-name" before trying the sequential scan
query?

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message David Johnston 2013-07-17 21:14:45 Re: Seq Scan vs Index on Identical Tables in Two Different Databases
Previous Message Ellen Rothman 2013-07-17 19:50:06 Seq Scan vs Index on Identical Tables in Two Different Databases