Search Postgresql Archives

Re: Help with pre-loaded arbitrary key sequences

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Jan 17, 2008 9:05 AM, James B. Byrne <byrnejb@xxxxxxxxxxxxx> wrote:
>
> If the entries involved numbered in the millions then Scott's approach has
> considerable merit.  In my case, as the rate of additions is very low and
> the size of the existing blocks is in the hundreds rather than hundreds of
> thousands then I believe that I will simply write my own iterator and do a
> repetitive select when on the incrementally proposed values until an
> opening is found then insert the new entry and update the iterator next
> value accordingly.

If race conditions are a possible issue, you use a sequence and
increment that until you get a number that isn't used.  That way two
clients connecting at the same time can get different, available
numbers.

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
       choose an index scan if your joining column's datatypes do not
       match

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux