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: 40181255.40606@cranel.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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

(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(at)Cranel(dot)com
Cranel. Technology. Integrity. Focus.

Browse pgsql-performance by date

  From Date Subject
Next Message Cott Lang 2004-01-28 21:32:53 Linux / Clariion
Previous Message Loeke 2004-01-28 18:56:46 views?