Re: [SQL] order by and limit with multi-column index, bug?

2002-12-13 Thread Harald Krake
On Friday 13 December 2002 03:47 pm, Jakub Ouhrabka wrote: > hi, > > could it be that "order by col1, col2 desc" is different from "order by > col1 desc, col2 desc" ? these are different and it's correct. > > i'm not sure if this is your problem since i haven't digged into it... > sorry... but chec

[SQL] order by and limit with multi-column index, bug?

2002-12-13 Thread Harald Krake
as a workaround for min()/max() on indexed columns forcing an index-scan I tried "order by" with "limit 1". Works fine for the first record but fails for the last. I don't know why. Here's the setup: A table "journal" containing several million records with an index "CREATE INDEX journal_kblatts