Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 9C742B5DC22 for ; Thu, 22 Sep 2011 00:23:06 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 82964-06 for ; Thu, 22 Sep 2011 03:22:59 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 44A20B5DC15 for ; Thu, 22 Sep 2011 00:22:59 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p8M3Mr35007869; Wed, 21 Sep 2011 23:22:53 -0400 (EDT) To: Michael Viscuso cc: Greg Smith , pgsql-performance@postgresql.org Subject: Re: Query optimization using order by and limit In-reply-to: <4E7AA399.6000209@getcarbonblack.com> References: <4E7A93F9.1050301@2ndQuadrant.com> <6768.1316657361@sss.pgh.pa.us> <4E7AA399.6000209@getcarbonblack.com> Comments: In-reply-to Michael Viscuso message dated "Wed, 21 Sep 2011 22:55:21 -0400" Date: Wed, 21 Sep 2011 23:22:53 -0400 Message-ID: <7868.1316661773@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201109/343 X-Sequence-Number: 45119 Michael Viscuso writes: > Greg/Tom, you are correct, these columns should be modified to whatever > is easiest for Postgres to recognize 64-bit unsigned integers. Would > you still recommend bigint for unsigned integers? I likely read the > wrong documentation that suggested bigint for signed 64-bit integers and > numeric(20) for unsigned 64-bit integers. Unsigned? Oh, hm, that's a bit of a problem because we don't have any unsigned types. If you really need to go to 2^64 and not 2^63 then you're stuck with numeric ... but that last bit is costing ya a lot. regards, tom lane