Re: Caching of Queries

Поиск
Список
Период
Сортировка
От Pierre-Frédéric Caillaud
Тема Re: Caching of Queries
Дата
Msg-id opsfaqckygcq72hf@musicbox
обсуждение исходный текст
Ответ на Re: Caching of Queries  (Josh Berkus <josh@agliodbs.com>)
Список pgsql-performance
> 1) The materialized data is available in 3 different forms; a list, a
> detail
> view, and a spreadsheet.  Each form as somewhat different columns and
> different rules about ordering, which would likely confuse an SQC
> planner.
> In this implementation, all 3 forms are able to share the same cache.

    See my proposal to cache function results.
    You can create a cached function and :

    SELECT your rows FROM cached_function(parameters) WHERE ... ORDER BY...
GROUP BY...

    will only fetch the function result from the cache, and then the only
additional costs are the ORDER and GROUP BY... the query parsing is very
simple, it's just a select, and a "cached function scan"

    I think caching can be made much more powerful if it is made usable like
this. I mean, not only cache a query and its result, but being able to use
cached queries internally like this and manipulaing them, adds value to
the cached data and allows storing less data in the cache because
duplicates are avoided. Thus we could use cached results in CHECK()
conditions, inside plsql functions, anywhere...

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

Предыдущее
От: Pierre-Frédéric Caillaud
Дата:
Сообщение: Re: Caching of Queries
Следующее
От: Pierre-Frédéric Caillaud
Дата:
Сообщение: Re: Caching of Queries