| От | Jan Bakuwel |
|---|---|
| Тема | Different order by behaviour depending on where clause? |
| Дата | |
| Msg-id | 4EAA3550.7080609@greenpeace.org обсуждение исходный текст |
| Ответы |
Re: Different order by behaviour depending on where clause?
|
| Список | pgsql-sql |
Hi, I have a compound query with some grouping, having and order by's saved as a view, say with name "myview". A) select * from "myview" returns the results as expected in the correct order (the order by is on fields "Category", "Year", "Month" and a few other fields). The results are correctly ordered by these fields as specified in the view. B) select * from "myview" where "Year"=2011 and "Month"=1 also returns the results as expected in the correct order (a subset of A). however C) select * from "myview" where "Year"=2011 and "Month" >= 1 and "Month" <= 1 returns the same resultset as B but the order of the rows is not correct (not even close; haven't been able to see any pattern). Any idea how I can further analyse/diagnose this? regards, Jan
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера