From: | Joe Conway <mail(at)joeconway(dot)com> |
---|---|
To: | Medora Schauer <mschauer(at)fairfield(dot)com> |
Cc: | postgresql <pgsql-performance(at)postgresql(dot)org> |
Subject: | Re: Odd performance results - more info |
Date: | 2003-08-05 17:41:43 |
Message-ID: | 3F2FEC57.5010201@joeconway.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Medora Schauer wrote:
> I would greatly appreciate it if someone could run this code in their
> environment and let me know if you get results similiar to mine.
> The INT test results in execution times of 11 - 50+ secs increasing
> each time the test is run. The FLOAT test execution times are
> consistently < 3 secs regardless of how many times it is run.
Without actually trying the code, I'd bet that an index is getting used
for the float8 case, but not in the int8 case:
if (dtype == INT_TYPE){
snprintf(buffer, sizeof(buffer),
"UPDATE shot_record SET trace_count = %d " \
"WHERE shot_line_num = %d " \
" AND shotpoint = %d " \
" AND index = %d" ,
0, shotline, shotpoint + i, 0);
} else {
snprintf(buffer, sizeof(buffer),
"UPDATE shot_record SET trace_count = %d " \
"WHERE shot_line_num = %f " \
" AND shotpoint = %f " \
" AND index = %d" ,
0, (float)shotline, (float)shotpoint + (float)i, 0);
}
Try running EXPLAIN ANALYZE on these update statements manually. It also
might help to run VACUUM ANALYZE after populating the tables.
HTH,
Joe
From | Date | Subject | |
---|---|---|---|
Next Message | Stephan Szabo | 2003-08-05 17:50:05 | Re: Odd performance results - more info |
Previous Message | Medora Schauer | 2003-08-05 17:30:46 | Odd performance results - more info |