5 ms·
Is there a way to sort on that without a recursive query?
by andreareina 6y ago
Is there a way to sort on that without a recursive query?
- RHSeeger 6y agoMy understanding is that it's possible, but not fast. A quick google search turned up this page, but I'm sure there are more https://stackoverflow.com/questions/515749/how-do-i-sort-a-linked-list-in-sql https://stackoverflow.com/questions/515749/how-do-i-sort-a-l... I seem to recall seeing _something_ more elegant than a linked list for this type of thing, but I don't recall what is what, offhand.
- names_are_hard 6y agoAll the answers on that page, except perhaps the Oracle one which uses a technique in not familiar with, are using recursion in CTEs
- lisper 6y agoYes: retrieve all the records and assemble the list in memory.