Re: Select * is very slow

From: Thom Brown <thom(at)linux(dot)com>
To: "shaiju(dot)ck" <shaiju(dot)ck(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Select * is very slow
Date: 2010-11-08 15:30:30
Message-ID: AANLkTikCp540GovPPcdTyLmsOV=qkpKG8AE9JnK-XH9S@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On 8 November 2010 06:16, shaiju.ck <shaiju(dot)ck(at)gmail(dot)com> wrote:

> Hi, I have a table employee with 33 columns. The table have 200 records
> now. Select * from employee takes 15 seconds to fetch the data!!! Which
> seems to be very slow. But when I say select id,name from empoyee it
> executes in 30ms. Same pefromance if I say select count(*) from emloyee. Why
> the query is slow if I included all the columns in the table. As per my
> understanding , number of columns should not be having a major impact on the
> query performance. I have increased the shared_buffres to 1024MB, but no
> improvement. I have noticed that the query "show shared_buffers" always show
> 8MB.Why is this? Does it mean that changing the shared_buffers in config
> file have no impact? Can anybody help? Shaiju
>

Could you run an EXPLAIN ANALYZE on the query? And what do the columns
contain? For instance, if you have 10 columns each returning massive XML
documents, each hundreds of megs, the bottleneck would be I/O bandwidth.

--
Thom Brown
Twitter: @darkixion
IRC (freenode): dark_ixion
Registered Linux user: #516935

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Justin Pitts 2010-11-08 15:37:36 Re: Select * is very slow
Previous Message Pavel Stehule 2010-11-08 15:23:32 Re: Select * is very slow