| От | Tomas Vondra |
|---|---|
| Тема | Re: CTE materializing sets? |
| Дата | |
| Msg-id | 777bd5c1ee2d3153b2984c19a2a1f03f@fuzzy.cz обсуждение исходный текст |
| Ответ на | Re: CTE materializing sets? (Craig Ringer <ringerc@ringerc.id.au>) |
| Список | pgsql-general |
Dne 09.10.2012 11:48, Craig Ringer napsal: > On 10/06/2012 08:45 AM, Liam Caffrey wrote: >> Hi, >> >> If I run a CTE does that materialize the resulting data in the same >> (or >> a similar) way as if I created a temp table and referred to that >> instead? Or does the CTE keep the set in memory? > > Really good question, I too would be interested in this. > > I'd expect it'd materialize to RAM if the result is within `work_mem` > but I'd love to know for sure. Yes - it's using a tuplestore, and that's the default behavior. It stores the tuples in RAM until it reaches work_mem and then starts spilling the data to disk. It's entirely transparent behavior. Tomas
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера