From: | Robert Haas <robertmhaas(at)gmail(dot)com> |
---|---|
To: | amul sul <sulamul(at)gmail(dot)com> |
Cc: | Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Alexander Kuzmenkov <a(dot)kuzmenkov(at)postgrespro(dot)ru>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Proposal: Improve bitmap costing for lossy pages |
Date: | 2017-11-10 21:55:37 |
Message-ID: | CA+TgmoasnPOGj3YJPNmNp4NsQ3znNX=6ZukTSPNBX+vncrc=aw@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Thu, Nov 9, 2017 at 3:55 AM, amul sul <sulamul(at)gmail(dot)com> wrote:
> It took me a little while to understand this calculation. You have moved this
> code from tbm_create(), but I think you should move the following
> comment as well:
I made an adjustment that I hope will address your concern here, made
a few other adjustments, and committed this.
One point of concern that wasn't entirely addressed in the above
discussion is the accuracy of this formula:
+ lossy_pages = Max(0, heap_pages - maxentries / 2);
When I first looked at Dilip's test results, I thought maybe this
formula was way off. But on closer study, the formula does a decent
(not fantastic) job of estimating the number of exact pages. The fact
that the number of lossy pages is off is just because the Mackert and
Lohman formula is overestimating how many pages are fetched. Now, in
Dilip's results, this formula more often than not - but not invariably
- predicted more exact pages than we actually got. So possibly
instead of maxentries / 2 we could subtract maxentries or some other
multiple of maxentries. I don't know what's actually best here, but I
think there's a strong argument that this is an improvement as it
stands, and we can adjust it later if it becomes clear what would be
better.
--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Stephen Frost | 2017-11-10 23:58:13 | Re: Simplify ACL handling for large objects and removal of superuser() checks |
Previous Message | Thomas Munro | 2017-11-10 20:10:36 | Re: LDAP URI decoding bugs |