Thread: Query taking a long time...
Hi all, I've just added a new column to a table, and I am updating it to have a value. The table has only 18000 rows, and yet the query takes in the order of 10 minutes to complete. This is the process running: last pid: 57224; load averages: 0.40, 0.50, 0.59 up 1+18:57:41 19:00:34 75 processes: 1 running, 74 sleeping CPU states: 6.6% user, 0.0% nice, 6.2% system, 0.8% interrupt, 86.4% idle Mem: 234M Active, 76M Inact, 45M Wired, 18M Cache, 48M Buf, 952K Free Swap: 521M Total, 324K Used, 521M Free PID USERNAME PRI NICE SIZE RES STATE TIME WCPU CPU COMMAND 56770 pgsql -6 0 24884K 20956K biord 2:14 10.11% 10.11% postgres My postgresql.conf settings: max_connections = 128 sort_mem = 2048 shared_buffers = 2048 log_timestamp = true The machine has a Seagate SCSI 40mb/sec HDD, running at some fast mhz that I can't quite remember (1Ghz?) Surely it should take a lot less than 10 minutes to touch 18000 rows!!! Chris
At 11:07 24/01/02 +0800, Christopher Kings-Lynne wrote: > >I've just added a new column to a table, and I am updating it to have a >value. The table has only 18000 rows, and yet the query takes in the order >of 10 minutes to complete. This is the process running: No triggers or FK constraints etc? ---------------------------------------------------------------- Philip Warner | __---_____ Albatross Consulting Pty. Ltd. |----/ - \ (A.B.N. 75 008 659 498) | /(@) ______---_ Tel: (+61) 0500 83 82 81 | _________ \ Fax: (+61) 0500 83 82 82 | ___________ | Http://www.rhyme.com.au | / \| | --________-- PGP key available upon request, | / and from pgp5.ai.mit.edu:11371 |/
> >I've just added a new column to a table, and I am updating it to have a > >value. The table has only 18000 rows, and yet the query takes > in the order > >of 10 minutes to complete. This is the process running: > > No triggers or FK constraints etc? Gah! I just remembered that I have a trigger on the table that updates the full text index on another table! Sorry... Chris