pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Adam PAPAI <wooh@wooh.hu>
To: pgsql-performance@postgresql.org
Subject: SELECT * FROM table is too slow
Date: Sun, 16 Dec 2007 19:34:45 +0100
Message-ID: <47656FC5.8060102@wooh.hu> (raw)

Hi pgsql-performance,

I've a problem with the select * on a small table.

See below:


x7=# EXPLAIN ANALYZE select * from megjelenesek;
                                                      QUERY PLAN

---------------------------------------------------------------------------------------------------------------------
  Seq Scan on megjelenesek  (cost=0.00..15633.07 rows=207 width=52)
(actual time=103.258..18802.530 rows=162 loops=1)
  Total runtime: 18815.362 ms
(2 rows)

x7=# \d megjelenesek;
                                       Table "public.megjelenesek"
    Column    |            Type             |
Modifiers
-------------+-----------------------------+------------------------------------------------------------
  idn         | integer                     | not null default
nextval('megjelenesek_idn_seq'::regclass)
  tag_id      | integer                     |
  tag_wlap_id | integer                     |
  get_date    | timestamp without time zone | default now()
  megjelent   | numeric                     | default 0
Indexes:
     "megjelenesek_pkey" PRIMARY KEY, btree (idn)
     "megjelenesek_tag_id" hash (tag_id)
     "megjelenesek_tag_wlap_id" hash (tag_wlap_id)

x7=# SELECT count(idn) from megjelenesek;
  count
-------
    162
(1 row)

Why does it take cca 18-20 sec to get the results?
Too many indexes?

-- 
Adam PAPAI
D i g i t a l Influence
http://www.wooh.hu
E-mail: wooh@wooh.hu
Phone: +36 30 33-55-735 (Hungary)




view thread (7+ messages)  latest in thread

Message-ID: <47656FC5.8060102@wooh.hu>
Permalink:  ../47656FC5.8060102@wooh.hu/
Also on:    postgresql.org/message-id/47656FC5.8060102@wooh.hu

 · 

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: wooh@wooh.hu
  Subject: Re: SELECT * FROM table is too slow
  In-Reply-To: <47656FC5.8060102@wooh.hu>

* 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