| От | Emi Lu |
|---|---|
| Тема | About index for temporay table in a plpgsql function |
| Дата | |
| Msg-id | 4419E362.4030303@encs.concordia.ca обсуждение исходный текст |
| Ответы |
Re: About index for temporay table in a plpgsql function
|
| Список | pgsql-general |
Hello, A question about index for temporary table. Postgresql 8.0.1, in a pl/pgsql function: begin ... -- Part I create temporal table t1 as ((select ... from .. left join ..... where ... ) union (select .. from ... left join ... where ... )); create index idx_t1_cols on t1(col1, col2) tablespace ts1; ... -- Part II insert into tableX ( select ... from tableY left join t1 using (col1, col2) where ... ... ) ... end; In the above example, the index for t1 can speed up the left join query in part II (although, there is no analyze done after the creation of index), right? The temporary table will be dropped automatically at the end of the function, right? By the way, is there anythings need to pay especially attention about temporary table under a function please? Thanks a lot, Ying
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера