pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedstatistics question
2+ messages / 2 participants
[nested] [flat]
* statistics question
@ 2003-06-13 15:55 Sidar Lopez Cruz <sidarlopez@hotmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Sidar Lopez Cruz @ 2003-06-13 15:55 UTC (permalink / raw)
To: pgsql-admin
can statistics help the postgresql performance? if yes how?
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: statistics question
@ 2003-06-14 18:51 Mendola Gaetano <mendola@bigfoot.com>
0 siblings, 0 replies; 2+ messages in thread
From: Mendola Gaetano @ 2003-06-14 18:51 UTC (permalink / raw)
To: sidarlopez@hotmail.com; +Cc: pgsql-admin
"Sidar Lopez Cruz" <sidarlopez@hotmail.com> wrote:
> can statistics help the postgresql performance? if yes how?
What do you mean with "statistics" ?
Anyway the planner use statistics information, collected by
postgres statistics collector ( you should turn on it:
stats_start_collector = true
stats_reset_on_server_start = true
stats_command_string = true
stats_row_level = true
stats_block_level = true
).
How:
suppose to do a select like this:
select * from table_foo where field = X;
if the 100 % of rows have field = X is better do
a sequenzial scan without jump around use the index,
instead if only 0.1 % of the rows have the field = X is better
do an index scan ( specially if the table is really huge ).
In reality the data partitioning is not 100% or 0.1 % and the
planner some time can take wrong decision so you should
increase or decrease the cost of index scan or full scan
playing with:
cpu_tuple_cost
cpu_index_tuple_cost
cpu_operator_cost
I'm sorry to say however that since version 7.X
I'm not anymore able to drive correctly the planner,
is like the planner consider these values less then before.
I hope I was clear enough.
Regards
Gaetano Mendola
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2003-06-14 18:51 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-06-13 15:55 statistics question Sidar Lopez Cruz <sidarlopez@hotmail.com>
2003-06-14 18:51 Re: statistics question Mendola Gaetano <mendola@bigfoot.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox