Re: Query caching

Поиск
Список
Период
Сортировка
От Karel Zak
Тема Re: Query caching
Дата
Msg-id Pine.LNX.3.96.1001112121835.30482B-100000@ara.zf.jcu.cz
обсуждение исходный текст
Ответ на Re: Query caching  (devik@cdi.cz)
Список pgsql-hackers
On Fri, 10 Nov 2000 devik@cdi.cz wrote:

> Did someone think about query costs ? Is you prepare
> query like SELECT id FROM t1 WHERE type=$1 and
> execute it with $1=1 and 2. For 1 there is one record
> in t1 a all other have type=2.
> Without caching, first query will use index, second
> not.
> Should cached plan use index or not ?
> devik
The postgresql already have planns caching. See SPI (saveplan), but
it's usable for internal stuff (for example triggers..) only. The
PREPARE/EXECUTE pull up it to be<->fe and make new memory type that
allows save it in shared memory. But else it's *nothing* new. 
A validity of cached planns is user problem now. Not some internal
method how check changes that out of date some query (or exist some idea?). 
It can be more changes like changes in DB schema.
If resolve this anyone clever person it will great for VIEW, SPI too.
Rebuid a query plan in the planner is not a problem, in the cache is 
stored original query tree, but you must known when... or must know
it a DB user.
                Karel



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

Предыдущее
От: The Hermit Hacker
Дата:
Сообщение: [RELEASE ANNOUNCEMENT] v7.0.3 *Final* now Available
Следующее
От: Larry Rosenman
Дата:
Сообщение: SYSLOG/LOG_LOCAL0