Re: No heap lookups on index

Поиск
Список
Период
Сортировка
От Jim C. Nasby
Тема Re: No heap lookups on index
Дата
Msg-id 20060118223703.GV17896@pervasive.com
обсуждение исходный текст
Ответ на No heap lookups on index  (David Scott <davids@apptechsys.com>)
Ответы Re: No heap lookups on index  (Christopher Kings-Lynne <chriskl@familyhealth.com.au>)
Список pgsql-hackers
On Wed, Jan 18, 2006 at 12:14:12PM -0800, David Scott wrote:
>    Do commercial databases implement MVCC in a way that allows an 
> efficient implementation of index lookups that can avoid heap lookups? 

Oracle does, but you pay in other ways. Instead of keeping dead tuples
in the main heap, they shuffle them off to an 'undo log'. This has some
downsides:

Rollbacks take *forever*, though this usually isn't much of an issue
unless you need to abort a really big transaction.

Every update/delete means two seperate writes to disk, one for the base
table and one for the undo log (well, there's also the redo log,
equivalent to our WAL). Though writes to undo can (and presumably are)
grouped together, so they should normally be a lot more efficient than
the updates to the base table unless you're updating data in table
order.

Of course there's downsides to our MVCC as well; the cost of index scans
is just one.
-- 
Jim C. Nasby, Sr. Engineering Consultant      jnasby@pervasive.com
Pervasive Software      http://pervasive.com    work: 512-231-6117
vcard: http://jim.nasby.net/pervasive.vcf       cell: 512-569-9461


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Unique constraints for non-btree indexes
Следующее
От: "Jim C. Nasby"
Дата:
Сообщение: Re: No heap lookups on index