| От | Dirk Lutzebaeck |
|---|---|
| Тема | best strategy doing a large copy and using indexes |
| Дата | |
| Msg-id | 14459.19087.735901.684613@ampato.aeccom.com обсуждение |
| Ответы |
Re: [SQL] best strategy doing a large copy and using indexes
|
| Список | pgsql-sql |
I have a table with 7 individual indexes (it models an object store with different types) and need to copy large data lists into this table regularly. I'm using COPY for it but it is unacceptable slow (4min for 1000 rows on a Linux/PII-400). I'm anticipating more than 20000 rows to copy. What combination of the following options is the best strategy to make this more efficient? a) drop indexes before COPY and recreate them after COPY b) put COPY in a transaction c) do VACUUM before (or after?) d) do VACUUM ANALYZE before (or after?) e) COPY to temp table and then make an INSERT SELECT FROM temp table f) anything else I'm using -f for the backend already. Dirk
В списке pgsql-sql по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера