pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Loren M. Lang <lorenl@alzatex.com>
To: PostgreSQL Perfomance <pgsql-performance@postgresql.org>
Subject: TEXT field and Postgresql Perfomance
Date: Fri, 7 Jan 2005 19:36:47 -0800
Message-ID: <20050108033647.GB2867@alzatex.com> (raw)

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
 



view thread (5+ messages)  latest in thread

Message-ID: <20050108033647.GB2867@alzatex.com>
Permalink:  ../20050108033647.GB2867@alzatex.com/
Also on:    postgresql.org/message-id/20050108033647.GB2867@alzatex.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: lorenl@alzatex.com
  Subject: Re: TEXT field and Postgresql Perfomance
  In-Reply-To: <20050108033647.GB2867@alzatex.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox