Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xzq16-0004tP-38 for pgsql-hackers@arkaria.postgresql.org; Sat, 13 Dec 2014 16:58:04 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1Xzq15-0008Km-FN for pgsql-hackers@arkaria.postgresql.org; Sat, 13 Dec 2014 16:58:03 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1Xzq14-0008Kf-38 for pgsql-hackers@postgresql.org; Sat, 13 Dec 2014 16:58:02 +0000 Received: from quark.amimatica.com ([213.27.130.92]) by makus.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Xzq10-0003Hr-Jg for pgsql-hackers@postgresql.org; Sat, 13 Dec 2014 16:58:00 +0000 Received: from vortex.hq.g4ii.com (182.Red-88-26-239.staticIP.rima-tde.net [88.26.239.182]) by quark.amimatica.com (Postfix) with ESMTPA id 34EAC6F2; Sat, 13 Dec 2014 17:57:56 +0100 (CET) Message-ID: <548C7012.7040608@adv-solutions.net> Date: Sat, 13 Dec 2014 17:57:54 +0100 From: =?windows-1252?Q?Jos=E9_Luis_Tall=F3n?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.0 MIME-Version: 1.0 To: Alvaro Herrera , Claudio Freire CC: Pg Hackers Subject: Re: On partitioning References: <007b01d015c6$373c21e0$a5b465a0$@lab.ntt.co.jp> <9766.1418422242@sss.pgh.pa.us> <548B6EE3.3020309@agliodbs.com> <20141213020946.GG1768@alvh.no-ip.org> In-Reply-To: <20141213020946.GG1768@alvh.no-ip.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org On 12/13/2014 03:09 AM, Alvaro Herrera wrote: > [snip] > Arbitrary SQL expressions (including functions) are not the thing to use > for partitioning -- at least that's how I understand this whole > discussion. I don't think you want to do "proofs" as such -- they are > expensive. Yup. Plus, it looks like (from reading Oracle's documentation) they end up converting the LESS THAN clauses into range lists internally. Anyone that can attest to this? (or just disprove it, if I'm wrong) I just suggested using the existing RangeType infrastructure for this ( <<, >> and && operators, specifically, might do the trick) before reading your mail citing BRIN. ... which might as well allow some interesting runtime optimizations when range partitioning is used and *a huge* number of partitions get defined --- I'm specifically thinking about massive OLTP with very deep (say, 5 years' worth) archival partitioning where it would be inconvenient to have the tuple routing information always in memory. I'm specifically suggesting some ( range_value -> partitionOID) mapping using a BRIN index for this --- it could be auto-created just like we do for primary keys. Just my 2c Thanks, / J.L. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers