Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Pgsql Novice > optimizing simp...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 1 Topic 3109 of 3160
Post > Topic >>

optimizing simple math operator

by renos@[EMAIL PROTECTED] ("Ryan D. E nos") May 9, 2008 at 10:11 AM

Hi,
I am an extreme postgres novice.  I occasionally use databases to handle 
large voter lists. 

I am running postgres on a Windows XP platform on a machine with 
Pentium(R) 4 CPU 3 GHz and 1GB of RAM.

I have a table with approximately 4 million rows that I am trying to 
update a single numeric column of with the following math operation 
using two integer columns:

update test
    set turnout1_cityblock = cityblock_election8/cityblock_regpop;

on the test table with approximately 45K rows, that update takes only 
about 4 seconds.  I have also tried casting the integers as numeric and 
that increases the update time to only about 10 seconds.

However, with the full table of 4 million rows, the update takes an 
unreasonable amount of time (I'm talking days).  There are no nulls in 
either column in the larger table.

Can anybody help me figure out why there is the inefficiency with the 
update in the large table?

thanks.
Ryan

-- 
Sent via pgsql-novice mailing list (pgsql-novice@[EMAIL PROTECTED]
)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-novice
 




 1 Posts in Topic:
optimizing simple math operator
renos@[EMAIL PROTECTED]   2008-05-09 10:11:03 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Sun Jul 6 18:32:13 CDT 2008.