Re: Select * is very slow

From: "Pierre C" <lists(at)peufeu(dot)com>
To: pgsql-performance(at)postgresql(dot)org, "shaiju(dot)ck" <shaiju(dot)ck(at)gmail(dot)com>
Subject: Re: Select * is very slow
Date: 2010-11-08 18:41:53
Message-ID: op.vlu7j3h2eorkce@apollo13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance


> 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.

30 ms is also amazingly slow for so few records and so little data.

- please provide results of "EXPLAIN ANALYZE SELECT id FROM table"
- huge bloat (table never vacuumed ?) => VACUUM VERBOSE
- bad network cable, network interface reverting to 10 Mbps, badly
configured network, etc ? (test it and test ping to server, throughput,
etc)
- server overloaded (swapping, etc) ? (vmstat, iostat, top, etc)

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Greg Smith 2010-11-08 22:12:57 Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?
Previous Message Tom Lane 2010-11-08 18:40:34 Re: Defaulting wal_sync_method to fdatasync on Linux for 9.1?