From: | Sergey Konoplev <gray(dot)ru(at)gmail(dot)com> |
---|---|
To: | Derek Poon <derekp+pgsql(at)ece(dot)ubc(dot)ca> |
Cc: | pgsql-general <pgsql-general(at)postgresql(dot)org> |
Subject: | Re: Hierarchical numeric data type |
Date: | 2013-08-07 00:24:52 |
Message-ID: | CAL_0b1s=m8P7USEr6Bxjfr3WNxF=54USC-A-xwYnEwT+G0hR7w@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
On Tue, Aug 6, 2013 at 2:36 PM, Derek Poon <derekp+pgsql(at)ece(dot)ubc(dot)ca> wrote:
> The performance impact of the enhanced comparator would probably be negligible, compared to I/O bottlenecks. A bigger issue would be backwards compatibility, especially for ltrees with existing btree indexes.
>
> Feedback? Suggestions?
Use integer arrays. It works just like you need
select array_to_string(c, '.')
from (values (array[1,10,2]), (array[1,5,3])) as sq(c)
order by c;
array_to_string
-----------------
1.5.3
1.10.2
and it is pretty fast when indexed.
--
Kind regards,
Sergey Konoplev
PostgreSQL Consultant and DBA
Profile: http://www.linkedin.com/in/grayhemp
Phone: USA +1 (415) 867-9984, Russia +7 (901) 903-0499, +7 (988) 888-1979
Skype: gray-hemp
Jabber: gray(dot)ru(at)gmail(dot)com
From | Date | Subject | |
---|---|---|---|
Next Message | liuyuanyuan | 2013-08-07 02:01:30 | Re: inserting huge file into bytea cause out of memory |
Previous Message | Sergey Konoplev | 2013-08-07 00:14:44 | Re: Exit code -1073741819 |