Skip site navigation (1) Skip section navigation (2)

Re: Query plan on identical tables differs . Why ?

From: Shridhar Daithankar <shridhar(at)frodo(dot)hserus(dot)net>
To: Fabio Panizzutti <panizzutti(at)interlogica(dot)net>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Query plan on identical tables differs . Why ?
Date: 2004-05-13 13:05:19
Message-ID: 40A3728F.2030402@frodo.hserus.net (view raw or flat)
Thread:
Lists: pgsql-performance
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::integer" instead?

> enable_hashagg = false
> enable_hashjoin = false
> enable_indexscan = true
> enable_mergejoin = true
> enable_nestloop = false
> enable_seqscan = true
> enable_sort = false
> enable_tidscan = false

Why do you have these off? AFAIK, 7.4 improved hash aggregates a lot. So you 
might miss on these in this case.

> # - Planner Cost Constants -
> 
> #effective_cache_size = 1000	# typically 8KB each

You might set it to something realistic.

And what is your hardware setup? Disks/CPU/RAM?

Just to be sure, you went thr.
http://www.varlena.com/varlena/GeneralBits/Tidbits/annotated_conf_e.html and 
http://www.varlena.com/varlena/GeneralBits/Tidbits/perf.html?

HTH

  Regards
    Shridhar

In response to

Responses

pgsql-performance by date

Next:From: Greg SpiegelbergDate: 2004-05-13 13:15:20
Subject: Off Topic - Re: [PERFORM] Quad processor options - summary
Previous:From: Fabio PanizzuttiDate: 2004-05-13 12:42:51
Subject: Query plan on identical tables differs . Why ?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group