dbTalk Databases Forums  

estimated row count way off.

comp.databases.postgresql.novice comp.databases.postgresql.novice


Discuss estimated row count way off. in the comp.databases.postgresql.novice forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Michael Guerin
 
Posts: n/a

Default estimated row count way off. - 04-06-2004 , 09:11 PM






I'm trying to understand why the row count is way off, setting the statistics_target higher seems to make it worse.

summary:
INFO: "timeseries": found 0 removable, 29,394,070 nonremovable row versions in 7480085 pages
stats_target set to 100 ->
INFO: "timeseries": 7480085 pages, 30000 rows sampled, ***154,958,639*** estimated total rows
stats_target set to 500 ->
INFO: "timeseries": 7485447 pages, 150000 rows sampled, ***253,679,871*** estimated total rows

The table is very active, every day about 20 M rows of the data is deleted and ~ 20M rows are inserted.

--details of one of the vacuum's
statistics_target = 100
INFO: vacuuming "public.timeseries"
INFO: index "timeseries_tsid" now contains ***29,394,070*** row versions in 480566 pages
DETAIL: 359684 index pages have been deleted, 20000 are currently reusable.
CPU 55.79s/8.15u sec elapsed 427.51 sec.
INFO: "timeseries": found 0 removable, 29394070 nonremovable row versions in 7480085 pages
DETAIL: 0 dead row versions cannot be removed yet.
There were 93065230 unused item pointers.
0 pages are entirely empty.
CPU 550.67s/91.75u sec elapsed 3256.11 sec.
INFO: vacuuming "pg_toast.pg_toast_1286079786"
INFO: index "pg_toast_1286079786_index" now contains 8472523 row versions in 88887 pages
DETAIL: 55839 index pages have been deleted, 20000 are currently reusable.
CPU 14.40s/1.99u sec elapsed 72.61 sec.
INFO: "pg_toast_1286079786": found 0 removable, 8472523 nonremovable row versions in 4924161 pages
DETAIL: 0 dead row versions cannot be removed yet.
There were 19416055 unused item pointers.
0 pages are entirely empty.
CPU 358.70s/54.13u sec elapsed 2058.52 sec.
INFO: analyzing "public.timeseries"
INFO: "timeseries": 7480085 pages, 30000 rows sampled, ***154,958,639*** estimated total rows



---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo (AT) postgresql (DOT) org)


Reply With Quote
  #2  
Old   
Tom Lane
 
Posts: n/a

Default Re: estimated row count way off. - 04-07-2004 , 12:48 AM






Michael Guerin <guerin (AT) rentec (DOT) com> writes:
Quote:
I'm trying to understand why the row count is way off, setting the statistics_target higher seems to make it worse.
This is not a row count estimate, it's just ANALYZE telling you how many
rows it sampled to prepare the pg_stats statistics.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.