Return-Path: owner-postman Received: from localhost.Berkeley.EDU (localhost.Berkeley.EDU [127.0.0.1]) by nobozo.CS.Berkeley.EDU (8.6.9/8.6.3) with SMTP id IAA12960 for postgres-redist; Thu, 15 Dec 1994 08:50:28 -0800 Resent-From: POSTGRES mailing list Resent-Message-Id: <199412151650.IAA12960@nobozo.CS.Berkeley.EDU> X-Authentication-Warning: nobozo.CS.Berkeley.EDU: Host localhost.Berkeley.EDU didn't use HELO protocol Sender: owner-postman@postgres.Berkeley.EDU X-Return-Path: owner-postman Received: from angular.illustra.com (angular.illustra.com [192.207.88.1]) by nobozo.CS.Berkeley.EDU (8.6.9/8.6.3) with SMTP id IAA12950 for ; Thu, 15 Dec 1994 08:50:26 -0800 Received: from boulevard.illustra.com by angular.illustra.com (4.1/smail2.5/06-10-94/M) id AA24943; Thu, 15 Dec 94 08:49:56 PST Received: by boulevard.illustra.com (4.1/smail2.5/06-10-94/S) id AA14157; Thu, 15 Dec 94 08:52:17 PST Message-Id: <9412151652.AA14157@boulevard.illustra.com> To: kilin@cs.umd.edu Cc: postgres@postgres.Berkeley.EDU Subject: Re: Question on R-trees In-Reply-To: kilin's message of 15 Dec 94 10:22 EST Date: Thu, 15 Dec 94 08:52:08 -0800 From: Mike Olson Resent-To: postgres-redist@postgres.Berkeley.EDU Resent-Date: Thu, 15 Dec 94 08:50:28 -0800 Resent-XMts: smtp 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/