From: | Markus Innerebner <markus(dot)innerebner(at)inf(dot)unibz(dot)it> |
---|---|
To: | pgsql-performance(at)postgresql(dot)org |
Subject: | Improve performance for writing |
Date: | 2012-12-27 13:10:40 |
Message-ID: | 5A910817-616E-4B46-B9E3-9A5C4F71A68E@inf.unibz.it |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
Hello
please do not consider this email as an yet another question how to speed up writing.
The situation is different:
My algorithm stores after the computation the result as tuples in a DB.
The tuples in addition to normal values (e.g. a,b) , contains sql statements that fetch values (for instance the geometry attribute) from another table (e.g. orig_table).
e.g.
INSERT INTO dest_table (
Select a,b, s.geometry,s.length from orig_table s where s.id=?
)
The number of inserts depends on the size of the result and vary from 10,000 to 1,000,000.
My question is: how can I speed up such inserts?
Only COPY statements want work, since I need additional values
Insert statements takes long time (even if using Bulk)
What do you suggest me in such a situation?
Would it be better to perform?
- first use COPY to store values in new table
- second update the new table with values from origin table
thanks for your hints / suggestions
cheers Markus
From | Date | Subject | |
---|---|---|---|
Next Message | Charles Gomes | 2012-12-27 14:45:38 | Re: Improve performance for writing |
Previous Message | Richard Neill | 2012-12-27 10:52:01 | Re: Why does the query planner use two full indexes, when a dedicated partial index exists? |