Re: What is the right way to deal with a table with rows that are not in a random order? - Mailing list pgsql-general

From Simon Riggs
Subject Re: What is the right way to deal with a table with rows that are not in a random order?
Date
Msg-id 1243498484.24860.486.camel@ebony.2ndQuadrant
Whole thread Raw
In response to What is the right way to deal with a table with rows that are not in a random order?  (Douglas Alan <darkwater42@gmail.com>)
Responses Re: What is the right way to deal with a table with rows that are not in a random order?  (Douglas Alan <darkwater42@gmail.com>)
List pgsql-general
On Wed, 2009-05-27 at 19:53 -0400, Douglas Alan wrote:
> We have a very large table (150 million rows) where the rows are not
> in a random order.  Some common queries will have millions of results,
> and this of course is slow.  For an interactive interface to the
> database, we want to put a limit on all queries so that queries will
> return quickly even if there are millions of results.

Partition the table, then scan the correct partition.

--
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support


pgsql-general by date:

Previous
From: Douglas Alan
Date:
Subject: Re: What is the right way to deal with a table with rows that are not in a random order?
Next
From: Richard Huxton
Date:
Subject: Re: How to speed up the first-time-searching in pgsql?