From: | "William N(dot) Zanatta" <william(at)veritel(dot)com(dot)br> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | pgsql-general(at)postgresql(dot)org, sszabo(at)megazone23(dot)bigpanda(dot)com |
Subject: | Re: Help on query plan. |
Date: | 2003-01-21 17:42:31 |
Message-ID: | 3E2D8687.3090507@veritel.com.br |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
> What does pg_stats show as the correlation value for the ip column?
> If you increase the statistics target and re-ANALYZE, does the
> correlation value change?
>
> regards, tom lane
well well well...let me see...I'm digging into an obscure
world...sorry I've never used a real database, just mysql heehe.
OK, as I don't know what is much and what isn't for the stats target,
I tried to increase it firstly to 15 (10 is default according to
documentation) and then to 20. Results follow:
No changes at all. Normal values since db build.
------------------------------------------------
access=# select correlation,attname from pg_stats where attname='ip';
correlation | attname
-------------+---------
0.202063 | ip
(1 row)
Changing statistics target to 15
------------------------------------------------
access=# alter table tbl_access alter column ip set statistics 15;
ALTER TABLE
access=# analyze verbose tbl_access (ip);
INFO: Analyzing public.tbl_access
ANALYZE
access=# select correlation,attname from pg_stats where attname='ip';
correlation | attname
-------------+---------
0.25932 | ip
(1 row)
Changing statistics target to 20
------------------------------------------------
access=# alter table tbl_access alter column ip set statistics 20;
ALTER TABLE
access=# analyze verbose tbl_access (ip);
INFO: Analyzing public.tbl_access
ANALYZE
access=# select correlation,attname from pg_stats where attname='ip';
correlation | attname
-------------+---------
0.213223 | ip
(1 row)
---------------------------------------------------------
Is there any place I can find more about how to better analyze the
data postgresql offers me? It looks really helpfull...
Thanks,
william
--
Perl combines all of the worst aspects of BASIC, C and line noise.
-- Keith Packard
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2003-01-21 17:46:30 | Re: Help on query plan. |
Previous Message | Tom Lane | 2003-01-21 17:42:23 | Re: LWLockAcquire |