Re: Question on PostgreSQL DB behavior w.r.t JOIN and sort order.

Поиск
Список
Период
Сортировка
От Venkatesan, Sekhar
Тема Re: Question on PostgreSQL DB behavior w.r.t JOIN and sort order.
Дата
Msg-id F84DE43FDACD4C45AA84E2DA016FAE2F1C65BF07@MX105CL01.corp.emc.com
обсуждение исходный текст
Ответ на Re: Question on PostgreSQL DB behavior w.r.t JOIN and sort order.  ("David G. Johnston" <david.g.johnston@gmail.com>)
Ответы Re: Question on PostgreSQL DB behavior w.r.t JOIN and sort order.  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-sql

Is there a way to tell the optimizer to retain the sort order if that is possible please?

 

From: David G. Johnston [mailto:david.g.johnston@gmail.com]
Sent: Tuesday, February 09, 2016 11:17 AM
To: Venkatesan, Sekhar
Cc: Tom Lane; pgsql-sql@postgresql.org
Subject: Re: [SQL] Question on PostgreSQL DB behavior w.r.t JOIN and sort order.

 

On Monday, February 8, 2016, Venkatesan, Sekhar <sekhar.venkatesan@emc.com> wrote:

So from what I understand, you say in postgres, if the sort order is not specified, postgres returns results in any order. Am I right?

Yes.  It will optimize for speed without any regard for maintaining any kind of ordering.  You may get the desired order for various reasons but without ORDER BY you cannot be guaranteed.

 

David J. 

В списке pgsql-sql по дате отправления:

Предыдущее
От: "David G. Johnston"
Дата:
Сообщение: Re: Question on PostgreSQL DB behavior w.r.t JOIN and sort order.
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: Question on PostgreSQL DB behavior w.r.t JOIN and sort order.