Re: [PERFORM] Tuning queries on large database

2004-08-06 Thread Gaetano Mendola
Valerie Schneider DSI/DEV wrote: Hi, I have some problem of performance on a PG database, and I don't know how to improve. I Have two questions : one about the storage of data, one about tuning queries. If possible ! My job is to compare Oracle and Postgres. All our operational databases have been

Re: [GENERAL] [PERFORM] Tuning queries on large database

2004-08-05 Thread Mark Kirkwood
I am guessing that Oracle can satisfy Q4 entirely via index access, whereas Pg has to visit the table as well. Having said that, a few partial indexes may be worth trying out on data.num_poste (say 10 or so), this won't help the table access but could lower the index cost. If you combine this

[PERFORM] Tuning queries on large database

2004-08-04 Thread Valerie Schneider DSI/DEV
Hi, I have some problem of performance on a PG database, and I don't know how to improve. I Have two questions : one about the storage of data, one about tuning queries. If possible ! My job is to compare Oracle and Postgres. All our operational databases have been running under Oracle for about

Re: [PERFORM] Tuning queries on large database

2004-08-04 Thread Rod Taylor
On Wed, 2004-08-04 at 08:44, Valerie Schneider DSI/DEV wrote: Hi, I have some problem of performance on a PG database, and I don't know how to improve. I Have two questions : one about the storage of data, one about tuning queries. If possible ! My job is to compare Oracle and Postgres.

Re: [PERFORM] Tuning queries on large database

2004-08-04 Thread Pierre-Frdric Caillaud
not so bad for oracle. What about for PG ? How data is stored I agree with the datatype issue. Smallint, bigint, integer... add a constraint... Also the way order of the records in the database is very important. As you seem to have a very large static population in your table, you should

Re: [PERFORM] Tuning queries on large database

2004-08-04 Thread Pierre-Frdric Caillaud
You often make sums. Why not use separate tables to cache these sums by month, by poste, by whatever ? Rule on insert on the big table updates the cache tables. ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose

FW: [PERFORM] Tuning queries on large database

2004-08-04 Thread Merlin Moncure
[forwarded to performance] The result is that for short queries (Q1 and Q2) it runs in a few seconds on both Oracle and PG. The difference becomes important with Q3 : 8 seconds with oracle 80 sec with PG and too much with Q4 : 28s with oracle 17m20s with PG !