[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgis-users
Subject:    [postgis-users] =?utf-8?q?St=5Funion_with_group_by_faster?=
From:       "Guillaume ARNAUD (ancienne adresse)" <guillaume.arnaud () cg82 ! fr>
Date:       2015-09-30 13:44:02
Message-ID: 925378fde475dcbe4e5aef59512561be () cg82 ! fr
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


 

Hi all, 

 I have a table in postgis which contains 6304 polygons.


I need to make a view which union some of this polygon.

 I write this
request :

 SELECT champ1, champ2,
st_multi(st_union(geom))::geometry(MULTIPOLYGON, 2154) geom
 FROM table

GROUP BY champ1, champ2, champ3, champ4, champ5

 The request works 36
seconds and give me the results.

 I have created some index on champ1
and champ2.

 Have you a tip to get the request faster ?

Thanks 
--


Guillaume ARNAUD
 Cellule SIGD
 Direction de l'Informatique
 Conseil
Départemental de Tarn-et-Garonne 
 
[Attachment #5 (unknown)]

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body style='font-family: Verdana,Geneva,sans-serif'>
<p>Hi all,&nbsp;</p>
<div class="moz-text-html" lang="x-unicode"><br /> I have a table in postgis which \
contains 6304 polygons.<br /> <br /> I need to make a view which union some of this \
polygon.<br /> <br /> I write this request :<br /> <br /> SELECT champ1, champ2, \
st_multi(st_union(geom))::geometry(MULTIPOLYGON, 2154) geom<br /> FROM table<br /> \
GROUP BY champ1, champ2, champ3, champ4, champ5<br /> <br /> The request works 36 \
seconds and give me the results.<br /> <br /> I have created some index on champ1 and \
champ2.<br /> <br /> Have you a tip to get the request faster ?<br /> <br />Thanks \
<div class="moz-signature">-- <br /> <div>Guillaume ARNAUD<br /> Cellule SIGD<br /> \
Direction de l'Informatique<br /> Conseil D&eacute;partemental de \
Tarn-et-Garonne&nbsp;</div> </div>
</div>
<div>&nbsp;</div>
</body></html>



_______________________________________________
postgis-users mailing list
postgis-users@lists.osgeo.org
http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic