some optimization?

Поиск
Список
Период
Сортировка
От Ciprian Popovici
Тема some optimization?
Дата
Msg-id 10214386024.20020919141452@integrare.ro
обсуждение исходный текст
Список pgsql-general
select distinct on (code) id,code,active from objects \
where version<=2 and (process=17 or process=0) \
group by id,code,active,version \
order by code asc,active desc,version desc

I'm a bit green with Postgres. Is this query performant enough? Are
there things I can do to make it better (indexing, some other method?)
I have 'id' as the primary key and unique(code,version,active).

-- Ciprian Popovici <ciprian.popovici@integrare.ro>


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

Предыдущее
От: Jean-Christian Imbeault
Дата:
Сообщение: Re: IN vs EXIIST
Следующее
От: Jochem van Dieten
Дата:
Сообщение: Re: IN vs EXIIST