R: R: R: [PERFORM] Query plan on identical tables differs . Why ?

2004-05-14 Thread Fabio Panizzutti
>>>-Messaggio originale- >>>Da: [EMAIL PROTECTED] >>>[mailto:[EMAIL PROTECTED] Per conto di >>>Christopher Kings-Lynne >>>Inviato: venerdì 14 maggio 2004 11.55 >>>A: Fabio Panizzutti >>>Cc: 'Manfred Koizar';

Re: R: R: [PERFORM] Query plan on identical tables differs . Why ?

2004-05-14 Thread Christopher Kings-Lynne
> I trust in my hardware an O.S so fsync setting is a > big dubt for my production enviroment . Then you are making a big mistake, loving your hardware more than your data... Chris ---(end of broadcast)--- TIP 6: Have you searched our list archiv

R: R: [PERFORM] Query plan on identical tables differs . Why ?

2004-05-14 Thread Fabio Panizzutti
Index Scan using pk_storico_misure_2 on storico_misure (cost=0.00..1984.64 rows=658 width=21) (actual >>>time=723.441..1858.107 rows=835 loops=1) Index Cond: ((data_tag > '2004-05-03 >>>00:00:00'::timestamp without time zone) AND (data_tag < '2004-05-12 00:00:00'::tim

R: R: [PERFORM] Query plan on identical tables differs . Why ?

2004-05-14 Thread Fabio Panizzutti
>>>-Messaggio originale- >>>Da: Stephan Szabo [mailto:[EMAIL PROTECTED] >>>Inviato: giovedì 13 maggio 2004 17.17 >>>A: Fabio Panizzutti >>>Cc: 'Shridhar Daithankar'; [EMAIL PROTECTED] >>>Oggetto: Re: R: [PERFORM] Query pl

R: R: [PERFORM] Query plan on identical tables differs . Why ?

2004-05-14 Thread Fabio Panizzutti
>>>-Messaggio originale- >>>Da: Tom Lane [mailto:[EMAIL PROTECTED] >>>Inviato: giovedì 13 maggio 2004 17.01 >>>A: Fabio Panizzutti >>>Cc: 'Shridhar Daithankar'; [EMAIL PROTECTED] >>>Oggetto: Re: R: [PERFORM] Query

Re: R: [PERFORM] Query plan on identical tables differs . Why ?

2004-05-13 Thread Stephan Szabo
On Thu, 13 May 2004, Fabio Panizzutti wrote: > I don't understand why the planner chose a different query plan on > identical tables with same indexes . Because it's more than table structure that affects the choice made by the planner. In addition the statistics about the values that are there

Re: R: [PERFORM] Query plan on identical tables differs . Why ?

2004-05-13 Thread Tom Lane
"Fabio Panizzutti" <[EMAIL PROTECTED]> writes: > I don't understand why the planner chose a different query plan on > identical tables with same indexes . Different data statistics; not to mention different table sizes (the cost equations are not linear). Have you ANALYZEd (or VACUUM ANALYZEd) b

R: [PERFORM] Query plan on identical tables differs . Why ?

2004-05-13 Thread Fabio Panizzutti
>>>-Messaggio originale- >>>Da: [EMAIL PROTECTED] >>>[mailto:[EMAIL PROTECTED] Per conto di >>>Shridhar Daithankar >>>Inviato: giovedì 13 maggio 2004 15.05 >>>A: Fabio Panizzutti >>>Cc: [EMAIL PROTECTED] >>

Re: [PERFORM] Query plan on identical tables differs . Why ?

2004-05-13 Thread Shridhar Daithankar
Fabio Panizzutti wrote: storico=# explain select tag_id,valore_tag,data_tag from storico_misure where (data_tag>'2004-05-03' and data_tag <'2004-05-12') and tag_id=37423 ; Can you please post explain analyze? That includes actual timings. Looking at the schema, can you try "and tag_id=37423::integ

[PERFORM] Query plan on identical tables differs . Why ?

2004-05-13 Thread Fabio Panizzutti
Hello I'm tuning a postgresql (7.4.2) server for best performance . I have a question about the planner . I have two identical tables : one stores short data (about 2.000.000 record now) and the other historycal data ( about 8.000.000 record now and growing ...) A simple test query : select t