From: | Josh Berkus <josh(at)agliodbs(dot)com> |
---|---|
To: | <pgsql-performance(at)postgresql(dot)org> |
Subject: | Comparitive UPDATE speed |
Date: | 2002-10-01 21:51:29 |
Message-ID: | 200210011451.29254.josh@agliodbs.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Relative performance question:
I have 2 UPDATE queires in a function.
table_a: 117,000 records
table_b: 117,000 records
table_c: 1.5 million records
#1 updates table_a, field_2 from table_b, field_1 based on a joining field_3.
Around 110,000 updates
#2 updates table_a, field_5 from table_c, field_2 joining on field_3.
Around 110,000 updates.
#1 takes 5-7 minutes; #2 takes about 15 seconds. The only difference I can
discern is that table_a, field_2 is indexed and table_a, field_5 is not.
Is it reasonable that updating the index would actually make the query take
20x longer? If not, I'll post actual table defs and query statements.
--
Josh Berkus
josh(at)agliodbs(dot)com
Aglio Database Solutions
San Francisco
From | Date | Subject | |
---|---|---|---|
Next Message | Josh Berkus | 2002-10-01 23:50:21 | Re: Comparitive UPDATE speed |
Previous Message | Josh Berkus | 2002-10-01 21:44:05 | Re: [pgsql-performance] Deletes from tables with foreign keys taking too long |