| От | Tom Lane |
|---|---|
| Тема | Re: Parsing of VIEW definitions |
| Дата | |
| Msg-id | 4971.1044887561@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: Parsing of VIEW definitions (Eric B.Ridge <ebr@tcdi.com>) |
| Список | pgsql-general |
"Eric B. Ridge" <ebr@tcdi.com> writes:
> So the text form of the Query *is* looked up in pg_rewrite on every
> use? Or is it looked up only once (per backend maybe?)? The docs
> didn't say... unless I overlooked it.
I think it's kept in the relcache, so in typical cases it'd be read
only once per backend.
> So what should be more efficient? Re-parsing/planning the entire SQL
> string (w/ the "view" definition in-line) or actually using the view?
Planning cost will be the same either way. Parsing costs should be
less, but on the other hand the rewriter will take some extra cycles.
My guess is it'd be about a wash --- but I've never tried to measure.
regards, tom lane
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера