[redland-dev] order by on dates
Gregory Williams
greg at evilfunhouse.com
Tue Jun 7 18:46:09 BST 2005
On Jun 7, 2005, at 12:56 PM, Danny Ayers wrote:
> On 6/7/05, Dave Beckett <dave.beckett at bristol.ac.uk> wrote:
>
>> I guess you'll be happy to know that I added an initial sorting
>> implementation in the query engine CVS this morning.
>
> Bravo!
I wholeheartedly second this "Bravo!" I'm very excited by this news.
>> Sorting is performed on all results in memory (so don't try that
>> with huge results)
>> and it's with stringy compares so integer 10 collates less
>> than integer 2 since "10" < "2", i.e. like RDQL. Fixing that is
>> piles of detail. So date sorting might work if you stick to
>> a normalised form such as without timezones.
FWIW, This doesn't bother me much. My biggest issue was having
sorting take place at the rasqal level before the data crossed the
language-binding barrier. After that barrier was crossed, the size of
the nodes (when wrapped in [perl] objects) and the multiple calls
back into the API to retrieve data from those nodes made sorting
*extremely* inefficient. At some point I'd like a "full" sorting, but
as long as rasqal is doing a first-pass, I can hand off the data to a
sorting algorithm that will hopefully approach O(n) (to handle the
timezones, &c.).
thanks again, Dave!
.greg
--
"Writing code on one line is like playing
the trumpet without breathing!"
- Adam Pisoni
More information about the redland-dev
mailing list