Skip site navigation (1) Skip section navigation (2)

Optimization questions

From: Greg Spiegelberg <gspiegelberg(at)cranel(dot)com>
To: PgSQL Performance ML <pgsql-performance(at)postgresql(dot)org>
Subject: Optimization questions
Date: 2004-01-28 19:49:41
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
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


    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)


     ((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.


Greg Spiegelberg
  Sr. Product Development Engineer
  Cranel, Incorporated.
  Phone: 614.318.4314
  Fax:   614.431.8388
  Email: gspiegelberg(at)Cranel(dot)com
Cranel. Technology. Integrity. Focus.

pgsql-performance by date

Next:From: Cott LangDate: 2004-01-28 21:32:53
Subject: Linux / Clariion
Previous:From: LoekeDate: 2004-01-28 18:56:46
Subject: views?

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group