| От | Martijn van Oosterhout |
|---|---|
| Тема | Re: Fastest way to load data in a table |
| Дата | |
| Msg-id | 20010926204047.A26521@svana.org обсуждение исходный текст |
| Ответ на | Fastest way to load data in a table (Antonio Navarro Navarro <hostmaster@bemarnet.es>) |
| Список | pgsql-general |
On Wed, Sep 26, 2001 at 11:17:10AM +0200, Antonio Navarro Navarro wrote: > Hi all. > > I need to clean and fill periodically a database with several hundred thousands > records readed from a plain ascii file. > > I have a Python script that opens the file and then, after a 'DELETE * > FROM table' submits an INSERT for each registry, but this process is very slow. > > How can I accelerate this uploading process ? Are you using BEGIN and COMMIT to avoid transaction overhead? What about using COPY? What about using TRUNCATE? HTH, -- Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/ > Magnetism, electricity and motion are like a three-for-two special offer: > if you have two of them, the third one comes free.
В списке pgsql-general по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера