Re: psql is slow and it does not take much resources
| От | Alban Hertroys |
|---|---|
| Тема | Re: psql is slow and it does not take much resources |
| Дата | |
| Msg-id | 4459C33B.7010502@magproductions.nl обсуждение исходный текст |
| Ответ на | Re: psql is slow and it does not take much resources ("Javier de la Torre" <jatorre@gmail.com>) |
| Список | pgsql-general |
Javier de la Torre wrote:
> Great! Then there will be no problems.
>
> I would use COPY but I think I can not. While moving from MySQL to
> PostgreSQL I am also transforming a pair of fields, latitude,
> longitude, into a geometry field, POINT, that is understood for
> Potgis. I though I will not be able to use COPY when inserting data
> with functions.
I think you'd get better results COPYing into a (temporary) table (say
it's called 'fish') and then inserting your data into your table using
INSERT (...) SELECT ... FROM fish; with the necessary conversions.
I think it'll be still faster than a couple million seperate INSERTs,
and it gives you the opportunity to fix mistakes if you issue the above
command inside a transaction.
--
Alban Hertroys
alban@magproductions.nl
magproductions b.v.
T: ++31(0)534346874
F: ++31(0)534346876
M:
I: www.magproductions.nl
A: Postbus 416
7500 AK Enschede
// Integrate Your World //
В списке pgsql-general по дате отправления: