Re: [WIP] Performance Improvement by reducing WAL for Update Operation

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: [WIP] Performance Improvement by reducing WAL for Update Operation
Дата
Msg-id 501C2E74.7060002@enterprisedb.com
обсуждение исходный текст
Ответ на [WIP] Performance Improvement by reducing WAL for Update Operation  (Amit kapila <amit.kapila@huawei.com>)
Ответы Re: [WIP] Performance Improvement by reducing WAL for Update Operation
Список pgsql-hackers
On 03.08.2012 14:46, Amit kapila wrote:
> Currently the change is done only for fixed length columns for simple tables and the tuple should not contain NULLS.
>
> This is a Proof of concept, the design and implementation needs to be changed based on final design required for
handlingother scenario's
 
>
> Update operation:
> -----------------------------
> 1. Check for the simple table or not.(No toast, No before update triggers)
> 2. Works only for not null tuples.
> 3. Identify the modified columns from the target entry.
> 4. Based on the modified column list, check for any variable length columns are modified, if so this optimization is
notapplied.
 
> 5. Identify the offset and length for the modified columns and store it as an optimized WAL tuple in the following
format.
>     Note: Wal update header is modified to denote whether wal update optimization is done or not.
>          WAL update header + Tuple header(no change from previous format) +
>                  [offset(2bytes)] [length(2 bytes)] [changed data value]
>                  [offset(2bytes)] [length(2 bytes)] [changed data value]
>    ....
>    ....

The performance will need to be re-verified after you fix these 
limitations. Those limitations need to be fixed before this can be applied.

It would be nice to use some well-known binary delta algorithm for this, 
rather than invent our own. OTOH, we have more knowledge of the 
attribute boundaries, so a custom algorithm might work better. In any 
case, I'd like to see the code to do the delta encoding/decoding to be 
put into separate functions, outside of heapam.c. It would be good for 
readability, and we might want to reuse this in other places too.

--   Heikki Linnakangas  EnterpriseDB   http://www.enterprisedb.com


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: -Wformat-zero-length
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: [PATCH] Docs: Make notes on sequences and rollback more obvious