Re: reorder table data

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: reorder table data
Дата
Msg-id 426628E7.4080605@archonet.com
обсуждение исходный текст
Ответ на Re: reorder table data  ("vinita bansal" <sagivini@hotmail.com>)
Ответы Re: reorder table data  ("vinita bansal" <sagivini@hotmail.com>)
Список 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 по дате отправления:

Предыдущее
От: Baldur Norddahl
Дата:
Сообщение: Re: postgresql start/stop/status script
Следующее
От: Devrim GUNDUZ
Дата:
Сообщение: Re: Postgresql 8.0.2 SLES 9 rpm - libpq.so.3 broken