X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id 94AF2D1B8D3 for ; Sat, 30 Aug 2003 16:34:12 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 46881-02 for ; Sat, 30 Aug 2003 13:33:42 -0300 (ADT) Received: from lakemtao02.cox.net (lakemtao02.cox.net [68.1.17.243]) by svr1.postgresql.org (Postfix) with ESMTP id 6DB4CD1B8C5 for ; Sat, 30 Aug 2003 13:33:41 -0300 (ADT) Received: from lhosts ([68.11.66.83]) by lakemtao02.cox.net (InterMail vM.5.01.06.04 201-253-122-130-104-20030726) with ESMTP id <20030830163341.GQUJ11854.lakemtao02.cox.net@lhosts> for ; Sat, 30 Aug 2003 12:33:41 -0400 Subject: Re: How to force Nested Loop plan? From: Ron Johnson To: PgSQL Performance ML In-Reply-To: <16208.50934.351000.90704@gargle.gargle.HOWL> References: <16208.41885.960000.12706@gargle.gargle.HOWL> <24637.1062255721@sss.pgh.pa.us> <16208.50934.351000.90704@gargle.gargle.HOWL> Content-Type: text/plain Message-Id: <1062261220.669.576.camel@haggis> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.4 Date: Sat, 30 Aug 2003 11:33:40 -0500 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200308/540 X-Sequence-Number: 3356 On Sat, 2003-08-30 at 10:47, Rob Nagler wrote: > Tom Lane writes: [snip] > enough. When I add this index, I will slow down inserts (about > 20K/day) and increase data size (this is the second largest table in [snip] Since I gather that this is a web-site, can we presume that they are clumped into an 8 hour range? 20,000/8 = 2,500/hour, which is 41.67/minute. If you can't do .69 inserts/second, something is wrong, and it ain't hardware, and it ain't Postgresql... > > PS: does server_id really need to be NUMERIC? Why not integer, or at > > worst bigint? > > It is a NUMERIC(18). It could be a bigint. What would be the change > in performance of this query if we changed it to bigint? http://www.postgresql.org/docs/7.3/static/datatype.html#DATATYPE-INT http://www.postgresql.org/docs/7.3/static/datatype.html#DATATYPE-NUMERIC-DECIMAL Scalars are faster than arbitrary precision types. Small (32 bit) scalars are faster than bit (64 bit) scalars on x86 h/w. -- ----------------------------------------------------------------- Ron Johnson, Jr. ron.l.johnson@cox.net Jefferson, LA USA "Adventure is a sign of incompetence" Stephanson, great polar explorer