| From: | Manolo <manolo(dot)espa(at)gmail(dot)com> | 
|---|---|
| To: | Brian Hurt <bhurt(at)janestcapital(dot)com> | 
| Cc: | pgsql-novice(at)postgresql(dot)org | 
| Subject: | Re: Sorting Tuples | 
| Date: | 2008-03-13 13:52:36 | 
| Message-ID: | 1205416356.7680.36.camel@localhost.localdomain | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-novice | 
Hi Brian.
That's what actually I was trying to build in order to get it.
I was thinking about 2 nested query. The inner one just sorting the output, something like:
SELECT * FROM huge_table ORDER BY a_column_of_huge_table ASC
The outer would compare for example the current tuple with the following one and as you said
 "If it finds an index such that a[i] > a[i+1], you know the result isn't sorted correctly."
Could you please write to me a sort of "what should that nested query be", please?
Remark I'm not a database user and SQL is not that fresh to me.
Thank you Brian!
> My advice would be to write a quick application that creates a cursor of 
> the sorted results, and sucks them out.  If it finds an index such that 
> a[i] > a[i+1], you know the result isn't sorted correctly.
> 
> Brian
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Jonah H. Harris | 2008-03-13 15:11:32 | Re: Sorting Tuples | 
| Previous Message | Manolo | 2008-03-13 13:40:01 | Re: Sorting Tuples |