Query with multiples operators BETWEEN

Поиск
Список
Период
Сортировка
От Renaud Tthonnart
Тема Query with multiples operators BETWEEN
Дата
Msg-id 3A953A0B.14D004@amwdb.u-strasbg.fr
обсуждение исходный текст
Ответ на Location of 7.1 version for download  ("Paulo Parola" <pgsql@brazilinfo.com>)
Ответы Re: Query with multiples operators BETWEEN
Список pgsql-general
This qwery takes about 2 seconds :

SELECT e.name
FROM Observation o, Exposure_EPIC e
WHERE o.numObs = e.obs
  AND e.instrPN IS NOT NULL
  AND o.RA BETWEEN 3 AND 5;

This one about 5 seconds :

SELECT e.name
FROM Observation o, Exposure_EPIC e
WHERE o.numObs = e.obs
  AND e.instrPN IS NOT NULL
  AND o.DE BETWEEN 2 AND 7;

And this takes a lot of time!!!! (I can't say how much because I 've
always given it up before its end,
                                                             at least
more than 10 minutes)

SELECT e.name
FROM Observation o, Exposure_EPIC e
WHERE o.numObs = e.obs
  AND e.instrPN IS NOT NULL
  AND o.RA BETWEEN 3 AND 5
  AND o.DE BETWEEN 2 AND 7;

Could someone help or explain me?

Thanks in advance and excuse my bad English
Renaud THONNART


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

Предыдущее
От: Louis-David Mitterrand
Дата:
Сообщение: iterating over all NEW.* values in a trigger?
Следующее
От: Neil Conway
Дата:
Сообщение: Re: Query with multiples operators BETWEEN