agora inbox for postgres@postgres.berkeley.edu
help / color / mirror / Atom feedFrom: Mike Olson <mao@illustra.com>
To: kilin@cs.umd.edu
Cc: postgres@postgres.Berkeley.EDU
Subject: Re: Question on R-trees
Date: Thu, 15 Dec 94 08:52:08 -0800
Message-ID: <9412151652.AA14157@boulevard.illustra.com> (raw)
kilin@cs.UMD.EDU writes:
> (1) Does it mean that everytime I query using the box operation (like <<, &<
> etc.) the Rtree will be used to access the tuples? Can I force the
> system to use the Rtree?
the query optimizer decides whether or not to use the index, based on
the expected size of the result set. if the table is very small, then
using the index will be purely overhead, since you'll likely have to
touch every page in both the index and the base table.
if the table's large, then in general, postgres will (correctly) choose
to use the index.
> (2) Will the output be ordered in anyway beacuase of the use of the index?
> I try to run a couple of querys and the output is ordered as the order
> of inputting them. Is it supposed to be that way?
rtrees return data in an order that makes no sense to the user. it
depends on the input order, the spatial distribution of boxes, and
the query rectangle. don't try to figure it out.
> (3) (A dumb question), for the box datatype, is a box constant specified
> by : "(xlow, ylow, xhigh, yhigh)"::box ?
yes.
> Thanks a lot
no problem, it was kind of fun.
mike
==============================================================================
To add/remove yourself to/from the POSTGRES mailing list: send mail with
the subject line ADD or DEL to "postgres-request@postgres.Berkeley.EDU".
If this fails, send mail to "post_questions@postgres.Berkeley.EDU" and
a human will deal with it. DO NOT post to the "postgres" mailing list.
==============================================================================
URL: http://s2k-ftp.CS.Berkeley.EDU:8000/postgres/
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: postgres@postgres.berkeley.edu
Cc: mao@illustra.com, kilin@cs.umd.edu
Subject: Re: Question on R-trees
In-Reply-To: <9412151652.AA14157@boulevard.illustra.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox