X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id D2A465E46C7 for ; Thu, 19 Aug 2004 23:16:47 -0300 (ADT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 86583-06 for ; Fri, 20 Aug 2004 02:16:48 +0000 (GMT) Received: from biglumber.com (biglumber.com [207.228.252.42]) by svr1.postgresql.org (Postfix) with SMTP id 0D8B95E46C1 for ; Thu, 19 Aug 2004 23:16:44 -0300 (ADT) Received: (qmail 28443 invoked from network); 20 Aug 2004 02:16:50 -0000 Received: from unknown (HELO localhost) (207.228.252.42) by 0 with SMTP; 20 Aug 2004 02:16:50 -0000 From: "Greg Sabino Mullane" To: pgsql-sql@postgresql.org Subject: Re: SQL Challenge: Arbitrary Cross-tab X-PGP-Key: 2529 DF6A B8F7 9407 E944 45B4 BC9B 9067 1496 4AC8 X-Request-PGP: http://www.biglumber.com/x/web?pk=2529DF6AB8F79407E94445B4BC9B906714964AC8 In-Reply-To: <22765.1092842015@sss.pgh.pa.us> Date: Fri, 20 Aug 2004 02:16:50 -0000 X-Mailer: JoyMail 1.48 Message-ID: X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200408/222 X-Sequence-Number: 18719 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 > Nope; Gaetano's right, you cannot assume that. It's entirely possible > for the planner to choose different plans depending on the OFFSET. > (Maybe not very likely, with such small offsets, but could happen.) Interesting. I realized that there was a finite chance of different plans being chosen, but it seemed neigh-impossible since there is no WHERE clause and the offsets only vary from 0-7. What sort of different plans would it choose, out of curiosity? Seq-scan vs. index-scan? Are there any particular cases where the same plan is guaranteed to be used? - -- Greg Sabino Mullane greg@turnstep.com PGP Key: 0x14964AC8 200408192216 -----BEGIN PGP SIGNATURE----- iD8DBQFBJV9xvJuQZxSWSsgRAp74AJ96mtrKC1J53y0TPqTPdq2Xost0fACg4DnJ 7P+dgpHWBazGNE9+SR7uxLY= =MZuM -----END PGP SIGNATURE-----