Subject | Creating indexes on array columns |
---|---|
Author | Nigel Weeks |
Post date | 2004-10-15T03:53:06Z |
I have a three component array, all numerics, and I can't create an index on
any of them.
Here's what I'm doing...(Indexes are at the bottom)
/* Create a structure for storing a 3D point in space
0-355 degrees, with 1 places of precision(for testing), all integer based
for sp
eed
The dimensions shall be x,y,z
*/
CREATE DOMAIN point AS NUMERIC(3,1) [3];
select 'Domain created OK' from rdb$database;
/* Create a table for storing polygons */
CREATE TABLE poly (
int_poly NUMERIC(18,0) NOT NULL, /* The Poly ID */
pnt_from POINT NOT NULL,
pnt_to POINT NOT NULL,
int_order INTEGER,
PRIMARY KEY(int_poly)
);
select 'Poly table created ok' from rdb$database;
CREATE GENERATOR gen_poly;
select 'Poly table generator created ok' from rdb$database;
/* Create a multi-dimensional index for the points */
CREATE ASC INDEX POLY_FROM ON poly pnt_from[1],pnt_from[2],pnt_from[3];
CREATE ASC INDEX POLY_FROM ON poly (pnt_from[1],pnt_from[2],pnt_from[3]);
CREATE ASC INDEX POLY_FROM ON poly (pnt_to);
CREATE ASC INDEX POLY_FROM ON poly (pnt_to [3]);
select 'Poly table indexes created ok' from rdb$database;
None of the index create lines work...any ideas?
Also, creating a UNIQUE (pnt_from, pnt_to) in the table also dies...
Nige.
Nigel Weeks
Tech Support & Systems Developer
nweeks@...
www.examiner.com.au
71 - 75 Paterson Street
Launceston
Tasmania 7250
Australia
Phone: 03 6336 7234
any of them.
Here's what I'm doing...(Indexes are at the bottom)
/* Create a structure for storing a 3D point in space
0-355 degrees, with 1 places of precision(for testing), all integer based
for sp
eed
The dimensions shall be x,y,z
*/
CREATE DOMAIN point AS NUMERIC(3,1) [3];
select 'Domain created OK' from rdb$database;
/* Create a table for storing polygons */
CREATE TABLE poly (
int_poly NUMERIC(18,0) NOT NULL, /* The Poly ID */
pnt_from POINT NOT NULL,
pnt_to POINT NOT NULL,
int_order INTEGER,
PRIMARY KEY(int_poly)
);
select 'Poly table created ok' from rdb$database;
CREATE GENERATOR gen_poly;
select 'Poly table generator created ok' from rdb$database;
/* Create a multi-dimensional index for the points */
CREATE ASC INDEX POLY_FROM ON poly pnt_from[1],pnt_from[2],pnt_from[3];
CREATE ASC INDEX POLY_FROM ON poly (pnt_from[1],pnt_from[2],pnt_from[3]);
CREATE ASC INDEX POLY_FROM ON poly (pnt_to);
CREATE ASC INDEX POLY_FROM ON poly (pnt_to [3]);
select 'Poly table indexes created ok' from rdb$database;
None of the index create lines work...any ideas?
Also, creating a UNIQUE (pnt_from, pnt_to) in the table also dies...
Nige.
Nigel Weeks
Tech Support & Systems Developer
nweeks@...
www.examiner.com.au
71 - 75 Paterson Street
Launceston
Tasmania 7250
Australia
Phone: 03 6336 7234