Home > Archive > PostgreSQL Hacks > February 2006 > Re: qsort again (was Re: [PERFORM] Strange Create









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: qsort again (was Re: [PERFORM] Strange Create
Gregory Maxwell

2006-02-17, 8:24 pm

On 2/17/06, Ragnar <gnari@hive.is> wrote:
> Say again ?
> Let us say you have 1 billion rows, where the
> column in question contains strings like
> baaaaaaaaaaaaaaa....aaa
> baaaaaaaaaaaaaaa....aab
> baaaaaaaaaaaaaaa....aac
> ...
> not necessarily in this order on disc of course
>
> The minimum value would be keyed as 00000001h,
> the next one as 00000002h and so on.
>
> Now insert new value 'aaaaa'
>
> Not only will you have to update 1 billion records,
> but also all the values in your map.
>
> please explain


No comment on the usefulness of the idea overall.. but the solution
would be to insert with the colliding value of the existing one lesser
than it..

It will falsly claim equal, which you then must fix with a second
local sort which should be fast because you only need to sort the
duplicates/false dupes. If you insert too much then this obviously
becomes completely useless.

---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com