TEXT field and Postgresql Perfomance

From: "Loren M(dot) Lang" <lorenl(at)alzatex(dot)com>
To: PostgreSQL Perfomance <pgsql-performance(at)postgresql(dot)org>
Subject: TEXT field and Postgresql Perfomance
Date: 2005-01-08 03:36:47
Message-ID: 20050108033647.GB2867@alzatex.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Do large TEXT or VARCHAR entries in postgresql cause any performance
degradation when a query is being executed to search for data in a table
where the TEXT/VARCHAR fields aren't being searched themselves?

Since, according to the postgresql docs, theirs no performance
difference between VARCHAR and TEXT, I'm assuming VARCHAR is identical
to TEXT entries with a restriction set on the length. And since TEXT
can be of any possible size, then they must be stored independently of
the rest of the table which is probably all stored in a fixed size rows
since all or nearly all of the other types have a specific size
including CHAR. Therefore TEXT entries must be in some other hash table
that only needs to be looked up when that column is referenced. If this
is the case then all other row data will need to be read in for an
unindexed query, but the TEXT columns will only be read if their being
searched though or queried. And if they're only being queried, then only
the rows that matched will need the TEXT columns read in which should
have minimal impact on performance even if they contain kilobytes of
information.

--
I sense much NT in you.
NT leads to Bluescreen.
Bluescreen leads to downtime.
Downtime leads to suffering.
NT is the path to the darkside.
Powerful Unix is.

Public Key: ftp://ftp.tallye.com/pub/lorenl_pubkey.asc
Fingerprint: B3B9 D669 69C9 09EC 1BCD 835A FAF3 7A46 E4A3 280C

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Bruno Wolff III 2005-01-08 04:03:23 Re: TEXT field and Postgresql Perfomance
Previous Message Josh Berkus 2005-01-08 01:20:08 Re: Does "HYPERTHREADING" do any harm if we use with RH9.0 and postgresql?