Speeding Up Queries

Eric Katherman vaiod at BERLOY.COM
Tue Oct 19 17:23:30 EDT 2004


Here is the result of \d (Note I am calling parceldata)

                List of relations
 Schema |        Name        |   Type   |  Owner
--------+--------------------+----------+----------
 public | geometry_columns   | table    | postgres
 public | parceldata         | table    | postgres
 public | parceldata_gid_seq | sequence | postgres
 public | pga_diagrams       | table    | postgres
 public | pga_forms          | table    | postgres
 public | pga_graphs         | table    | postgres
 public | pga_images         | table    | postgres
 public | pga_layout         | table    | postgres
 public | pga_queries        | table    | postgres
 public | pga_reports        | table    | postgres
 public | pga_scripts        | table    | postgres
 public | spatial_ref_sys    | table    | postgres
 public | streets            | table    | postgres
 public | streets_gid_seq    | sequence | postgres
(14 rows)


The call in the mapfile looks like this:
  LAYER
    GROUP Parcels
    NAME parcels
      DATA "the_geom from parceldata"
      CONNECTION "user=postgres password=guess dbname=gis host=localhost
port=5432"
      CONNECTIONTYPE postgis
    STATUS On
    TYPE POLYGON

    PROJECTION
      "init=/usr/local/share/proj/nad83:202"
    END

    CLASS
      COLOR 238 230 222
      OUTLINECOLOR 172 157 139
    END
  END


 The url contains the extent as well as some other switches I am using to turn
layers on and off. I am using PHP as well.  Everything renders as expected
but it seems wastefull to generate the entire map (or at least it seems to)
for a small area.

Eric

> Eric,
> You need to provide more information in your question. Your map file,
> and what URL you are using to hit it, would give some ideas. Plus, if
> you are using PostGIS, the output of \d on the tables you are using.
> Paul
>
> Eric Katherman wrote:
> > Does anybody have any pointers for speeding up the time MS takes to draw
> > a map based on PostGIS queries?  I have shapefiles for all the parcels in
> > my city and when I am zoomed into a smaller area it still seems to
> > calculate everything outside of my extents, can I limit this based on
> > extents somehow maybe?
> >
> > Eric



More information about the mapserver-users mailing list