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

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search for
  Advanced Search

Re: Simple select, but takes long time



"James DeMichele" <James(dot)DeMichele(at)redfin(dot)com> wrote ..

> Then, I have the following index on the table:
 
> "this_index" (status, source_id, <another_column>)

If you have many queries of this type, do

CLUSTER this_index ON tablename;

and retry the SELECT.

MySQL is using some sort of auto-clustering ISAM on the other box mayhaps?

In Postgres you will have to re-CLUSTER periodically if there are INSERTs and UPDATEs.



Home | Main Index | Thread Index

Privacy Policy | PostgreSQL Archives hosted by Command Prompt, Inc. | Designed by tinysofa
Copyright © 1996 – 2008 PostgreSQL Global Development Group