Re: Should TIDs be typbyval = FLOAT8PASSBYVAL to speed up CREATE INDEX CONCURRENTLY?
От | Peter Geoghegan |
---|---|
Тема | Re: Should TIDs be typbyval = FLOAT8PASSBYVAL to speed up CREATE INDEX CONCURRENTLY? |
Дата | |
Msg-id | CAM3SWZRwY4y2LCPZCXrQxgWv6Ywvk4tcC=5HHog=zf_hEfriYA@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: Should TIDs be typbyval = FLOAT8PASSBYVAL to speed up CREATE INDEX CONCURRENTLY? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Should TIDs be typbyval = FLOAT8PASSBYVAL to speed up
CREATE INDEX CONCURRENTLY?
|
Список | pgsql-hackers |
On Mon, Sep 7, 2015 at 9:03 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > I'm not sure that it would be just "a little work" --- I suspect that > the idea that pass-by-val types are 1, 2, 4, or 8 bytes is embedded in > a fair number of places, including alignment macros in which any added > complexity would have a large distributed cost. I didn't immediately consider that. >> This matters because a major cost during CREATE INDEX CONCURRENTLY is >> a TID-based datum sort (this is probably most of the cost over and >> above a conventional CREATE INDEX). > > Might be better to hack a special case right there (ie, embed TIDs into > int8s and sort the int8s) rather than try to change the type's SQL > declaration. That sounds at least as effective as what I originally sketched. It would also be better to have a simple comparator, rather than the more complex TID comparator. Baking the details into the int8 representation, rather than having the comparator tease it apart will be faster. Ordinarily, abbreviation does that kind of thing, but there are upsides to not doing that when tie-breaker comparisons are not actually required, and this really only needs to happen in one place. I hope someone picks this up soon. -- Peter Geoghegan
В списке pgsql-hackers по дате отправления: