From: | Gokulakannan Somasundaram <gokul007(at)gmail(dot)com> |
---|---|
To: | Greg Stark <gsstark(at)mit(dot)edu> |
Cc: | pgsql-hackers list <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: A thought on Index Organized Tables |
Date: | 2010-02-24 20:04:50 |
Message-ID: | 9362e74e1002241204x60c846cah90d9957c0e751edf@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
>
>> That doesn't work because when you split an index page any sequential
>>> scan in progress will either see the same tuples twice or will miss
>>> some tuples depending on where the new page is allocated. Vacuum has a
>>> clever trick for solving this but it doesn't work for arbitrarily many
>>> concurrent scans.
>>>
>>> Consider how the range scans are working today, while the page split
>> happens.
>>
>> The Seq scan should follow the right sibling to do the seq scan.
>>
>> Gokul.
>>
>>
> Actually thinking about what you suggested for a while, i think it should
> be possible, because the Oracle Fast Full Index scan essentially scans the
> index like that. I will try to think a way of doing that with Lehman and
> Yao...
>
> Gokul.
>
OK I think, i can think of a solution to achieve fast full index scan like
oracle.
a) Issue ids to every block that gets created inside the index. we are
already doing that
b) Now before the fast full index scan starts, note down the max id that got
issued.
c) Now do a scan similar to Full Table Scan till that max id. Now, while we
are scanning the blocks, note down the right siblings in a list, if the
right sibling block id is greater than the max id that got issued. These are
the ones, which have got split after the scan started
d) Now after we reach that max block, try to range scan on missing links
till we hit the end / get a right sibling less than the max block id noted.
Once we do this for all the missing links, we have scanned through the
entire chain. So this will definitely be faster than range scan.
Thanks to you, i have thought about an important issue and also a solution
for it.
Thanks,
Gokul.
From | Date | Subject | |
---|---|---|---|
Next Message | Richard Huxton | 2010-02-24 20:15:37 | Re: FW: Unable to install PostgreSQL on Windows Server 2003 SP2 |
Previous Message | Josh Berkus | 2010-02-24 20:03:08 | Re: pg_stop_backup does not complete |