default ordering of query result - are they always guarantee

Поиск
Список
Период
Сортировка
От Yan Cheng CHEOK
Тема default ordering of query result - are they always guarantee
Дата
Msg-id 731331.59045.qm@web65701.mail.ac4.yahoo.com
обсуждение исходный текст
Ответы Re: default ordering of query result - are they always guarantee  (Guillaume Lelarge <guillaume@lelarge.info>)
Список pgsql-general
I have the following table :

        CREATE TABLE measurement_1
        (
          measurement_id serial NOT NULL,
          fk_unit_id int NOT NULL,
          "value" double precision,
          measurement_type text NOT NULL,
          measurement_unit text NOT NULL
        );

When I want to retrieve the query. By default, the query result are ordered in ascending order, by using
measurement_id.

SELECT measurement_type, value, measurement_unit
    FROM
    measurement_1

This is the default behavior I want. However, I am not sure whether this is always guarantee? Or shall I explicitly
makethe query in the following form? Will this have performance impact on row with millions? 

SELECT measurement_type, value, measurement_unit
    FROM
    measurement_1 ORDER BY measurement_id ASC

Thanks.

by ensuring measurement_1 result are ordered in ascending
Thanks and Regards
Yan Cheng CHEOK





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

Предыдущее
От: Joshua Tolley
Дата:
Сообщение: Re: Connection lost
Следующее
От: Guillaume Lelarge
Дата:
Сообщение: Re: default ordering of query result - are they always guarantee