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

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Douglas Alan <darkwater42(at)gmail(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: What is the right way to deal with a table with rows that are not in a random order?
Date: 2009-05-28 08:14:44
Message-ID: 1243498484.24860.486.camel@ebony.2ndQuadrant
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard Huxton 2009-05-28 08:23:57 Re: How to speed up the first-time-searching in pgsql?
Previous Message Anirban Pal 2009-05-28 06:12:31 Re: Postgres registry access using java