Re: order by

Поиск
Список
Период
Сортировка
Искать
От
Adam Scott
Тема
Re: order by
Дата
в 14:48:37
Msg-id
CA+s62-MiEFrGTjg+Bmhrk-U5EYaNkgFKDf4Sv6oVpX2TS_EPJw@mail.gmail.com
Ответ на
order by (Marc Millas)
Список
Дерево обсуждения
order by Marc Millas <marc.millas@mokadb.com>
Re: order by Adrian Klaver <adrian.klaver@aklaver.com>
Re: order by Marc Millas <marc.millas@mokadb.com>
Re: order by Adrian Klaver <adrian.klaver@aklaver.com>
Re: order by Marc Millas <marc.millas@mokadb.com>
Re: order by Adrian Klaver <adrian.klaver@aklaver.com>
Re: order by Kirk Wolak <wolakk@gmail.com>
Re: order by Ron <ronljohnsonjr@gmail.com>
Re: order by Adam Scott <adam.c.scott@gmail.com>
Re: order by Marc Millas <marc.millas@mokadb.com>
Re: order by Ron <ronljohnsonjr@gmail.com>
Re: order by Marc Millas <marc.millas@mokadb.com>
Check the index creation has NULLS FIRST (or LAST) on both indexes that are used. Use explain to see what indexes are used 


On Thu, May 11, 2023, 7:30 AM Marc Millas <marc.millas@mokadb.com> wrote:
Hi,

I keep on investigating on the "death postgres" subject
but open a new thread as I don't know if it's related to my pb.

I have 2 different clusters, on 2 different machines, one is prod, the second test.
Same data volumes.

On prod if I do  
select col_a, count(col_a) from table_a group by col_a order by col_a desc, 
I get the numbers of NULL on top.
To get the number of NULL on top on the test db, I have to 
select col_a, count(col_a) from table_a group by col_a order by col_a asc.

so, it looks like there is something different within the b-tree operator class of varchar (?!?)
between those 2 clusters.

What can I check to to explain this difference as, to my understanding, it's not a postgresql.conf parameter.

thanks

Marc MILLAS
Senior Architect
+33607850334

В списке pgsql-general по дате отправления
От: Adrian Klaver
Дата:
Сообщение: Re: order by
От: Marc Millas
Дата:
Сообщение: Re: order by
FAQ