Re: [HACKERS] qsort again (was Re: Strange Create

Поиск
Список
Период
Сортировка
От Gregory Maxwell
Тема Re: [HACKERS] qsort again (was Re: Strange Create
Дата
Msg-id e692861c0602171436y3f627d32y1df152732da6936c@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] qsort again (was Re: Strange Create  (Ragnar <gnari@hive.is>)
Список pgsql-performance
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.

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

Предыдущее
От: "Lane Van Ingen"
Дата:
Сообщение: Measuring Lock Performance
Следующее
От: Antal Attila
Дата:
Сообщение: Stored proc and optimizer question