faster and faster!!

Поиск
Список
Период
Сортировка
От bpalmer
Тема faster and faster!!
Дата
Msg-id Pine.BSO.4.33.0109280959130.992-100000@mizer.crimelabs.net
обсуждение исходный текст
Ответы Re: faster and faster!!  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-sql
Two questions:

- Does the order of WHERE clauses make a difference?  I was trying to make
some of my code faster and tried switching two clauses that should have
effected the query,  but there was no speed difference.

- I have a query:

SELECT stamp
FROM table
WHERE timestamp > now() - INTERVAL '1 0:00'

This query takes 13 seconds to run.  If I were to run another query such
as:

WHERE sid > 1000

it would return almost instantly.  There are indexes on both columns.  Is
dealing with timestamps that slow?  Is there any way to speed it up?

Thanks all,
- Brandon


----------------------------------------------------------------------------c: 646-456-5455
              h: 201-798-4983b. palmer,  bpalmer@crimelabs.net           pgp:crimelabs.net/bpalmer.pgp5
 



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

Предыдущее
От: "Pat M"
Дата:
Сообщение: Function return rows?
Следующее
От: "Rebekah Kirk"
Дата:
Сообщение: Stupid Question