SELECT * FROM table is too slow

Поиск
Список
Период
Сортировка
От Adam PAPAI
Тема SELECT * FROM table is too slow
Дата
Msg-id 47656FC5.8060102@wooh.hu
обсуждение исходный текст
Ответы Re: SELECT * FROM table is too slow  ("Joshua D. Drake" <jd@commandprompt.com>)
Re: SELECT * FROM table is too slow  ("Steinar H. Gunderson" <sgunderson@bigfoot.com>)
Список pgsql-performance
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)


В списке pgsql-performance по дате отправления:

Предыдущее
От: Gregory Stark
Дата:
Сообщение: Re: libgcc double-free, backend won't die
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: SELECT * FROM table is too slow