Received: from me.tm.ee (adsl895.estpak.ee [213.168.23.133]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eBUCCOL83597 for ; Sat, 30 Dec 2000 07:12:26 -0500 (EST) (envelope-from hannu@tm.ee) Received: from tm.ee (IDENT:hannu@localhost.localdomain [127.0.0.1]) by me.tm.ee (8.9.3/8.9.3) with ESMTP id OAA00926; Sat, 30 Dec 2000 14:09:32 +0200 Message-ID: <3A4DD07C.73C236B7@tm.ee> Date: Sat, 30 Dec 2000 14:09:32 +0200 From: Hannu Krosing X-Mailer: Mozilla 4.72 [en] (X11; U; Linux 2.2.17 i686) X-Accept-Language: en MIME-Version: 1.0 To: Gilles Bernard CC: pgsql-docs@postgresql.org Subject: Re: Postgres ignoring RTree for geometric operators References: <200012290946.KAA01221@fwm1.matra-ms2i.fr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Archive-Number: 200012/79 X-Sequence-Number: 126 > Gilles Bernard wrote: > > Hello, I'm trying to figure out how Postgres (7.0.3 on a DEC alpha > OSF1 4.0F) deals with geometric types and operators. > So I've create a table like this : > > >create table geo > >( > > id int4 primary key, > > forme box, > > hmin float4, > > hmax float4, > > nom varchar(40) > >); > > I've created a RTree index on the 'forme' field : > > >create index geo_is on geo using RTREE (forme); > > > The table is populated with 400,000 lines inserted like this : > > >insert into geo values (1, > '((51387.07,17572.56),(51440.62,17626.11))',30863.37,30916.92,'Donnee > 1'); > >insert into geo values (2, > '((94763.02,17172.77),(94785.77,17195.51))',70223.09,70245.83,'Donnee > 2'); > >insert into geo values (3, > '((49476.61,12469.86),(49515.67,12508.93))',8389.54,8428.60,'Donnee > 3'); > > ... > >insert into geo values (399998, > '((86788.54,86867.89),(86857.69,86937.04))',86144.60,86213.75,'Donnee > 399998'); > >insert into geo values (399999, > '((94317.45,3723.26),(94413.56,3819.36))',70345.16,70441.27,'Donnee > 399999'); Here you should probably do "vacuum analyze"; or just create the index _after_ inserting some amount of data tho have the initial statistics favour index scan ------------ Hannu