Search Postgresql Archives
Temporarily disable all table indices
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: "Postgres General" <pgsql-general@xxxxxxxxxxxxxx>
- Subject: Temporarily disable all table indices
- From: "Dmitry Koterov" <dmitry@xxxxxxxxxx>
- Date: Tue, 27 Mar 2007 02:24:44 +0400
- Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:sender:to:subject:mime-version:content-type:x-google-sender-auth; b=oOA5eYKNOIQT5dNxJxQl92rzQrXgX4MTeyxN6Fs96ORbF/DgK9O+GaglCuxbK3gYFLmPoAS2mHV+yXuXFULFFkYGlloA2qJsCexgOsvXRynZNx8Z5fK0tdO9uPk9BOlH/INwzFXcd+PaHf0ZEEf8LOtW7jVhJklElZG/JN3i5Uc=
- Reply-to: dmitry@xxxxxxxxxx
Hello.
I need to perform a mass operation (UPDATE) on each table row. E.g. - modify one table column:
UPDATE tbl SET tbl_text = MD5(tbl_id);
The problem is that if this table contains a number of indices, such UPDATE is very very slow on large table.
I have to drop all indices on the table, then run the update (very quick) and after that - re-create all indices back. It is much more speedy. Unfortunately the table structure may change in the future (e.g. - new indices are added), so I don't know exactly in this abstraction layer, what indices to drop and what - to re-create.
Is any way (or ready piece of code) to save all existed indices, drop them all and then - re-create after a mass UPDATE?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]
[Postgresql Jobs]
[Postgresql Admin]
[Postgresql Performance]
[Linux Clusters]
[PHP Home]
[PHP on Windows]
[Kernel Newbies]
[PHP Classes]
[PHP Books]
[PHP Databases]
[Postgresql & PHP]
[Yosemite]