[postgis-devel] Re: outlying test cases

David Blasby dblasby at refractions.net
Wed Nov 19 14:50:20 PST 2003


strk wrote:
> dblasby wrote:
> 
>>strk wrote:
>>
>>>dblasby wrote:
>>>
>>>
>>>>There are a few outlying test cases.
>>>>a. Make a table with a bunch (50,000+) of rows which have the same point
>>>>("insert into t1 values ('POINT(0 0)'); insert into t1 select * from t1;
>>>>insert into t1 select * from t1; insert into t1 select * from t1;....).
>>>>b. Make a table with a bunch (50,000+) of NULL values.
>>>>c. combine a&b
>>>>d. combine c & other real data

> combine real data and whatever else (with UNION).
> I noticed that with UNION ALL everything works ok (does not use btree opclass).
> Also, if I reduce the number of rows in the real data set I do not get
> problems. It is a very weird thing...

I was thinking of just making each of the 4 tables given above and 
building an index on them.  If (1) creates fine and (2) appears to 
work(*), its probably working fine.

I was thinking of using "INSERT INTO"/"CREATE TABLE AS" instead of any 
type of UNION operations.

dave

(*) you can turn the index on and off with "SET ENABLE_SEQSCAN = on|off" 
and "SET ENABLE_INDEXSCAN = on|off".  Combine with EXPLAIN/EXPLAIN ANALYSE.

For example::

SET ENABLE_SEQSCAN = on;
SET ENABLE_INDEXSCAN = off;
SELECT count(*) FROM ... WHERE the_geom &&& ...;
SET ENABLE_INDEXSCAN = on;
SET ENABLE_SEQSCAN = off;
SELECT count(*) FROM ... WHERE the_geom &&& ...;






More information about the postgis-devel mailing list