Speeding Up Queries

Eric Katherman vaiod at BERLOY.COM
Tue Oct 19 14:27:10 PDT 2004


Sorry...


                                   Table "public.parceldata"
   Column   |         Type         |                          Modifiers
------------+----------------------+-------------------------------------------------------------
 gid        | integer              | not null default
nextval('public.parceldata_gid_seq'::text)
 area       | numeric              |
 address    | character varying    |
 dbt_end    | character varying(8) |
 dbt_begin  | character varying(8) |
 end_date   | character varying(8) |
 begin_date | character varying(8) |
 filename   | character varying    |
 floor      | bigint               |
 apn        | character varying    |
 id         | bigint               |
 the_geom   | geometry             |
Indexes:
    "parceldata_pkey" primary key, btree (gid)
Check constraints:
    "enforce_srid_the_geom" CHECK (srid(the_geom) = -1)
    "enforce_geotype_the_geom" CHECK (geometrytype(the_geom) =
'MULTIPOLYGON'::text OR the_geom IS NULL)


> \d parceldata ?
>
> Eric Katherman wrote:
> > 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