Re: Why does ExecComputeStoredGenerated() form a heap tuple
| От | Peter Eisentraut |
|---|---|
| Тема | Re: Why does ExecComputeStoredGenerated() form a heap tuple |
| Дата | |
| Msg-id | 2f06f0ee-9f05-d6b7-d48f-841f4f69cc7e@2ndquadrant.com обсуждение исходный текст |
| Ответ на | Re: Why does ExecComputeStoredGenerated() form a heap tuple (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>) |
| Ответы |
Re: Why does ExecComputeStoredGenerated() form a heap tuple
|
| Список | pgsql-hackers |
On 2019-04-01 11:23, Peter Eisentraut wrote: > On 2019-03-31 04:57, Andres Freund wrote: >> while rebasing the remaining tableam patches (luckily a pretty small set >> now!), I had a few conflicts with ExecComputeStoredGenerated(). While >> resolving I noticed: > > The core of that code was written a long time ago and perhaps hasn't > caught up with all the refactoring going on. I'll look through your > proposal and update the code. The attached patch is based on your sketch. It's clearly better in the long term not to rely on heap tuples here. But in testing this change seems to make it slightly slower, certainly not a speedup as you were apparently hoping for. Test setup: create table t0 (a int, b int); insert into t0 select generate_series (1, 10000000); -- 10 million \copy t0 (a) to 'test.dat'; -- for comparison, without generated column truncate t0; \copy t0 (a) from 'test.dat'; -- master create table t1 (a int, b int generated always as (a * 2) stored); truncate t1; \copy t1 (a) from 'test.dat'; -- patched truncate t1; \copy t1 (a) from 'test.dat'; -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
Вложения
В списке pgsql-hackers по дате отправления: