Re: Indexing timestamps

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: Indexing timestamps
Дата
Msg-id 200206080248.g582mPu22554@candle.pha.pa.us
обсуждение исходный текст
Ответ на Re: Indexing timestamps  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Ответы Re: Indexing timestamps  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Список pgsql-sql
Stephan Szabo wrote:
> On Thu, 6 Jun 2002, Josh Berkus wrote:
> 
> >
> > Stephan,
> >
> > > Unfortunately you can't do that in that sort of syntax.  You'll
> > > need to create a function that returns the month and is marked
> > > as iscachable and use that function in the index creation and
> > > query.
> >
> > Hmmm.  I take it that NOW() is not ISCACHABLE, and that's Andre's indexing
> > problem?   What would be the pitfall of creating an alternate version of
> > NOW() that ISCACHABLE?
> 
> I believe it was not marked as iscachable.  I think it's now marked as
> static in dev sources which I would guess would mean that it could
> consider an index scan.  I think with care an iscachable function that
> just called now() would probably be safe for interactive queries.

We have all those new cacheable settings now to indicate things that can
change during the transaction, function call, or never.

--  Bruce Momjian                        |  http://candle.pha.pa.us pgman@candle.pha.pa.us               |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


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

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Re: Limiting database size
Следующее
От: Bruce Momjian
Дата:
Сообщение: Re: PostgreSQL on AIX