Re: Optimize querry sql

Поиск
Список
Период
Сортировка
От Michael Glaesemann
Тема Re: Optimize querry sql
Дата
Msg-id 02B986A3-8CED-4140-AE23-C1928041A822@seespotcode.net
обсуждение исходный текст
Ответ на Re: Optimize querry sql  ("Scott Marlowe" <scott.marlowe@gmail.com>)
Список pgsql-sql
On Sep 14, 2007, at 10:17 , Scott Marlowe wrote:

> OK, I was just afraid there was some "bad thing" TM that I wasn't
> aware of with now(), which, btw, I use all the time.  whew.

I use CURRENT_TIMESTAMP and CURRENT_DATE for three reasons:
* they're SQL-standard keywords, unlike now(). This might make it  
more portable, but I'm not planning on using another backend any time  
soon.
* I think it's clearer to distinguish between timestamps and dates
* I don't like the look of now() with the parens.

Not that these are necessarily good reasons, but they're mine :). I  
haven't measured it, but there might actually be (a very small bit  
of) overhead in calling CURRENT_TIMESTAMP and CURRENT_DATE as they're  
converted to now(), so that's one potential reason not to use them.

Michael Glaesemann
grzm seespotcode net




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

Предыдущее
От: "Scott Marlowe"
Дата:
Сообщение: Re: Optimize querry sql
Следующее
От: Andreas Joseph Krogh
Дата:
Сообщение: Format intervall as hours/minutes etc