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

Поиск
Список
Период
Сортировка
От bricklen
Тема Re: Seq Scan vs Index on Identical Tables in Two Different Databases
Дата
Msg-id CAGrpgQ9_8CD6JZN53sBMye9WXv6pOQOBvYfAV0H3Xo_s482x1Q@mail.gmail.com
обсуждение исходный текст
Ответ на Seq Scan vs Index on Identical Tables in Two Different Databases  (Ellen Rothman <erothman@datalinedata.com>)
Ответы Re: Seq Scan vs Index on Identical Tables in Two Different Databases  (Ellen Rothman <erothman@datalinedata.com>)
Список pgsql-performance

On Wed, Jul 17, 2013 at 12:50 PM, Ellen Rothman <erothman@datalinedata.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?

В списке pgsql-performance по дате отправления:

Предыдущее
От: Ellen Rothman
Дата:
Сообщение: Seq Scan vs Index on Identical Tables in Two Different Databases
Следующее
От: David Johnston
Дата:
Сообщение: Re: Seq Scan vs Index on Identical Tables in Two Different Databases