X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 72E62D1BCB2 for ; Wed, 28 Jan 2004 19:50:17 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 67792-01 for ; Wed, 28 Jan 2004 15:49:47 -0400 (AST) Received: from COLSWEEPER.cranel.com (newmail.cranel.com [12.32.71.147]) by svr1.postgresql.org (Postfix) with ESMTP id 25BD9D1C9B3 for ; Wed, 28 Jan 2004 15:49:45 -0400 (AST) Received: from colmail01.cranel.com (colmail01.cranel.com) by COLSWEEPER.cranel.com (Content Technologies SMTPRS 4.3.12) with ESMTP id for ; Wed, 28 Jan 2004 14:48:43 -0500 Received: from cranel.com (gspiegelberg.cranel.com [192.168.11.134]) by colmail01.cranel.com with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2657.72) id DW32BACZ; Wed, 28 Jan 2004 14:53:31 -0500 Message-ID: <40181255.40606@cranel.com> Date: Wed, 28 Jan 2004 14:49:41 -0500 From: Greg Spiegelberg Organization: Cranel, Inc. User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: PgSQL Performance ML Subject: Optimization questions Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at postgresql.org X-Archive-Number: 200401/296 X-Sequence-Number: 5470 Couple quick questions. 1. Turning autocommit=FALSE is most useful when using COPY to load data to a table and could impact the performance of INSERT of similiar data on the same table. 2. What comparison operator is the most efficient when comparing text or varchar? Today the SELECT I use to compare rows in this table do a simple row comparison (A.c1,A.c2,A.c3,...)<>(B.c1,B.c2,B.c3,...) but there is a mix of int8, varchar, text in there. Just fishing to see if I should instead use ((A.i1,A.i2,A.i3)<>(B.i1,B.i2,B.i3)AND A.t1!=B.t1) or ((A.i1,A.i2,A.i3)<>(B.i1,B.i2,B.i3)AND compare_func(A.t1,B.t1)) where columns iX are integer and tX are text or varchar. While I'm asking, how is TEXT and VARCHAR compared? Byte by Byte until there's an inequality? Just checking. Ty, Greg -- Greg Spiegelberg Sr. Product Development Engineer Cranel, Incorporated. Phone: 614.318.4314 Fax: 614.431.8388 Email: gspiegelberg@Cranel.com Cranel. Technology. Integrity. Focus.