Re: reorder table data - Mailing list pgsql-general

From Richard Huxton
Subject Re: reorder table data
Date
Msg-id 426628E7.4080605@archonet.com
Whole thread Raw
In response to Re: reorder table data  ("vinita bansal" <sagivini@hotmail.com>)
Responses Re: reorder table data  ("vinita bansal" <sagivini@hotmail.com>)
List pgsql-general
vinita bansal wrote:
> Hi,
>
> There is no particular pattern but it is generally the update queries of
> the form "update tableName set colName='something'" that are taking a
> lot of time incase there is a lot of background data.

Well, that query will obviously update the entire table, but if you
can't predict which rows will be changed all you can do is index the
appropriate column(s) you select against.

 > Also, I would not
> like to change my application to access data from another schema when
> required. I want this to be handled at database level wherein everything
> in database itself is organised to make access faster.

Not without some pattern to work to - if you can't say which rows will
be accessed next, then how can your database know?

Can you provide an actual example of a query you find too slow, how long
it takes and what it's EXPLAIN ANALYSE is?

--
   Richard Huxton
   Archonet Ltd

pgsql-general by date:

Previous
From: Baldur Norddahl
Date:
Subject: Re: postgresql start/stop/status script
Next
From: Devrim GUNDUZ
Date:
Subject: Re: Postgresql 8.0.2 SLES 9 rpm - libpq.so.3 broken