[postgis-users] Deleting fron from postgres/geometry column

Pena Kupen kupen at wippies.fi
Tue Mar 22 05:40:57 PDT 2011


Hello,

I have two tables.
1. House-table with 15 columns. No any postgis-columns. There is about 8 000 000 rows in table. Unique primary key is house_id.
2. Name-table with 4 columns. one geometry clolumn as:
 public name location 2 3067 POINT
There is about 2 000 000 rows in table. Unique primary key is location_id.

When deleting rows from table there is a quite big difference.
a) Deleting from House-table. On in-part there is about 100 locations.
delete from House where house_id in (-1,1351400,3350186,926,31028,1150407,134,34953,349750,66349950,...) 
This takes 43500ms

a) Deleting from Name-table. On in-part there is about 100 locations (same as above).
delete from name where location_id in (-1,1351400,3350186,926,31028,1150407,134,34953,349750,66349950,...) 
This takes 2181340ms

I have run deletes about 20 times and in different order, but there is only small ms-difference on times

Could there be something to do with geometry-columns?

--
kupen

-- 
Wippies-vallankumous on täällä! Varmista paikkasi vallankumouksen eturintamassa ja liity Wippiesiin heti!
http://www.wippies.com/




More information about the postgis-users mailing list