Re: slow update & index question

Поиск
Список
Период
Сортировка
От scott.marlowe
Тема Re: slow update & index question
Дата
Msg-id Pine.LNX.4.33.0210211242180.22620-100000@css120.ihs.com
обсуждение исходный текст
Ответ на slow update & index question  ("Williams, Travis L, NPONS" <tlw@att.com>)
Список pgsql-general
On Mon, 21 Oct 2002, Williams, Travis L, NPONS wrote:

> I have a script that is updating the DB by reading in a file with 467
> lines.  Each file is named by the shelf the information was gotten from.
> Each line is tab seperated and consists of a column name and the value
> that it should be update to.  The update line in the perl script looks
> like this: update table set "column name" = 'value' where "Shelf_Name" =
> '$shelf'
>
> Now this works.. but it takes almost 1 minute to do the updates.  With
> nothing else at all touching the DB..  is this normal?  The DB is
> index'd on the Shelf_Name column.. but how do I know if it is using the
> index.. or does that not even matter in this case?

Try putting a begin; and end; command around your updates, so that they
are all one big transaction.  That should speed things up.


В списке pgsql-general по дате отправления:

Предыдущее
От: "Williams, Travis L, NPONS"
Дата:
Сообщение: Re: slow update & index question
Следующее
От: Larry Rosenman
Дата:
Сообщение: Re: slow update & index question