[mapserver-users] Create Index Multikeys in Postgresql
Frédérique Boyer
Frédérique Boyer
Fri, 18 Oct 2002 14:15:41 +0200
This is a multi-part message in MIME format.
------=_NextPart_000_0041_01C276B0.D75CCCA0
Content-Type: text/plain;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
Hi list,
I have a table of roads in postgres with 3000000 lines.
I want to create a layer based on the lines with the attribut =
"roads.fonction =3D 'A'" or "roads.fonction=3D'B'".
The part of the .map file is :=20
LAYER
TYPE LINE
STATUS DEFAULT
CONNECTIONTYPE postgis
CONNECTION "user=3Dpostgres dbname=3Dtest0 host=3Dlocalhost =
port=3D5432"
DATA "the_geom from roads"
FILTER "(fonction=3D'A' or fonction=3D'B')"
CLASS
etc...
END
END
I have created two indexes on the table :
1) CREATE INDEX roads_geom ON roads USING GIST ( the_geom =
gist_geometry_ops);
2) CREATE INDEX "fonction_roads_key" ON "roads" USING RTREE =
("fonction");
I think the second index is not used. And I'd like to create a new index =
with these two fields concatenated, but I don't know how to do with this =
particular syntaxe.
Thanks
Frederique Boyer
------=_NextPart_000_0041_01C276B0.D75CCCA0
Content-Type: text/html;
charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 6.00.2600.0" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>Hi list,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I have a table of roads in postgres =
with=20
3000000 lines.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I want to create a layer based on the =
lines with=20
the attribut "roads.fonction =3D 'A'" or =
"roads.fonction=3D'B'".</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>The part of the .map file is : =
</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2> =20
LAYER<BR> TYPE=20
LINE<BR> STATUS=20
DEFAULT<BR> CONNECTIONTYPE=20
postgis<BR> CONNECTION =
"user=3Dpostgres =20
dbname=3Dtest0 host=3Dlocalhost =
port=3D5432"<BR> DATA=20
"the_geom from roads</FONT><FONT face=3DArial=20
size=3D2>"<BR> FILTER "(fonction=3D'A' or=20
fonction=3D'B')"</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
CLASS</FONT></DIV>
<DIV><FONT face=3DArial =
size=3D2> =20
etc...</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> =
END</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> END<BR></FONT></DIV>
<DIV><FONT face=3DArial size=3D2>I have created two indexes on the table =
:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> 1) CREATE INDEX roads_geom =
ON roads=20
USING GIST ( the_geom gist_geometry_ops);</FONT></DIV>
<DIV><FONT face=3DArial size=3D2> 2) CREATE INDEX =
"fonction_roads_key" ON=20
"roads" USING RTREE ("fonction");</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>I think the second index is not used. =
And I'd like=20
to create a new index with these two fields concatenated, but I don't =
know how=20
to do with this particular syntaxe.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2></FONT> </DIV>
<DIV><FONT face=3DArial size=3D2>Thanks</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Frederique =
Boyer</FONT></DIV></BODY></HTML>
------=_NextPart_000_0041_01C276B0.D75CCCA0--
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users