Indexing
Jason FU
tsfu at HKUCS.ORG
Tue Aug 23 07:03:18 PDT 2005
If I've got a spatial table like the following,
============================================================
CREATE TABLE 0803_200401_reprint_all_p
(
gid serial NOT NULL,
recno int8,
elevation float8,
dataflags int8,
dispx float8,
dispy float8,
size float8,
angle float8,
scale int8,
keyword varchar,
usernum int8,
fcode varchar,
datatype int4,
descflags int8,
themenum int8,
indexkey varchar,
superflags int8,
sourceid varchar,
the_geom geometry,
CONSTRAINT hk0803_200401_reprint_all_p_pkey PRIMARY KEY (gid),
CONSTRAINT enforce_dims_the_geom CHECK (ndims(the_geom) = 2),
CONSTRAINT enforce_geotype_the_geom CHECK (geometrytype(the_geom) =
'POINT'::text OR the_geom IS NULL),
CONSTRAINT enforce_srid_the_geom CHECK (srid(the_geom) = -1)
)
WITH OIDS;
============================================================
what do I do if I need to use the column called usernum in my where clause?
Should I simply create an index as follows:
create index usernum_idx on 0803_200401_reprint_all_p (usernum);
?
Please advise. Thanks.
Jason
More information about the MapServer-users
mailing list