Re: query cache

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: query cache
Дата
Msg-id 24627.1332528890@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: query cache  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: query cache
Список pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> What I think is more common is the repeated submission of queries that
> are *nearly* identical, but with either different parameter bindings
> or different constants.  It would be nice to have some kind of cache
> that would allow us to avoid the overhead of parsing and planning
> nearly identical statements over and over again, but the trick is that
> you have to fingerprint the query to notice that's happening in the
> first place, and the fingerprinting has to cost less than what the
> cache saves you.  I don't know whether that's possible, but I suspect
> it's far from easy.

The traditional solution to this is to make the application do it, ie,
parameterized prepared statements.  Since that has direct benefits to
the application as well, in that it can use out-of-line values and
thereby avoid quoting and SQL-injection risks, it's not apparent that
it's a good idea to expend lots of sweat to reverse-engineer
parameterization from a collection of unparameterized queries.
        regards, tom lane


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

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Apology to the community
Следующее
От: Merlin Moncure
Дата:
Сообщение: Re: Apology to the community