Re: Natural sort order

Поиск
Список
Период
Сортировка
От Filip Rembiałkowski
Тема Re: Natural sort order
Дата
Msg-id CAP_rwwkrnuANFjirZvkS=Ca2gejQvQa-xnM-vXsOFSQ1Jy92cQ@mail.gmail.com
обсуждение исходный текст
Ответ на Natural sort order  (Richard Klingler <richard@klingler.net>)
Ответы Re: Natural sort order  (Richard Klingler <richard@klingler.net>)
Список pgsql-sql
If you use btrsort(column) from the example, you can just create a
functional index on this expression.

CREATE INDEX mytable_column_btrsort_idx ON mytable( btrsort(column) );

this can help.





2011/12/17 Richard Klingler <richard@klingler.net>:
> Morning...
>
> What is the fastest way to achieve natural ordering from queries?
>
> I found a function at:
> http://2kan.tumblr.com/post/361326656/postgres-natural-ordering
>
> But it increases the query time from around 0.4msecs to 74msecs...
> Might be not much if occasional queries are made..but I use it for
> building
> up a hierarchical tree menu in a web application where every msecs
> counts (o;
>
>
> cheers
> richard
>
>
> --
> Sent via pgsql-sql mailing list (pgsql-sql@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-sql


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

Предыдущее
От: Stefan Weiss
Дата:
Сообщение: Re: Column "..." does not exist (view + union)
Следующее
От: John Fabiani
Дата:
Сообщение: Re: using a generated series in function