From: V i s h a l Kashyap @ [Sai Hertz And Control Systems] <sank89@sancharnet.in>
To: C. Bensend <benny@bennyvision.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: VARCHAR -vs- CHAR: huge performance difference?
Date: Wed, 16 Jun 2004 18:22:38 +0530
Message-ID: <40D04296.5060103@sancharnet.in> (raw)
In-Reply-To: <51429.63.227.74.41.1087347504.squirrel@webmail.stinkweasel.net>
References: <51429.63.227.74.41.1087347504.squirrel@webmail.stinkweasel.net>
Dear C. Bensend wrote:
> I am parsing and storing emails, so I have a lot of character string
>data to worry about. In one particular table, I have 26 columns of type
>varchar, with widths of 24-8192 characters. This is the table that is
>giving me some pretty severe performance problems.
>
> For example, many of the statistics I run against these emails is a
>simple count(), whether it be on a column or *. Right now, counting the
>rows takes in excess of 3.5 seconds. OK, that's pretty slow. However,
>there are only --> 24,000 <-- rows in this table! I could see it taking
>a long time if I had 500,000 rows, or a million, but 24,000?
>
>
>
For similar post someone suggested to do a count like
select count(*) from table where any = any limit 1 ;
Try this look if thiers any performance increase.
--
Regards,
Vishal Kashyap
Director / Lead Software Developer,
Sai Hertz And Control Systems Pvt Ltd,
http://saihertz.rediffblogs.com
Yahoo IM: mailforvishal[ a t ]yahoo.com
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: sank89@sancharnet.in, benny@bennyvision.com
Subject: Re: VARCHAR -vs- CHAR: huge performance difference?
In-Reply-To: <40D04296.5060103@sancharnet.in>
References: <51429.63.227.74.41.1087347504.squirrel@webmail.stinkweasel.net> <40D04296.5060103@sancharnet.in>
* 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