Re: indexes and big tables

From: Robert Vojta <vojta(at)ipex(dot)cz>
To: Zeugswetter Andreas SB <ZeugswetterA(at)wien(dot)spardat(dot)at>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: indexes and big tables
Date: 2001-07-27 13:02:26
Message-ID: 20010727150226.N6382@ipex.cz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> The index is only used for the line= part of the where clause
> with your query. With many rows the "line=" is not selective enough
> to justify the index.

I tried move only needed data into new table and change query into ...

netacc=> EXPLAIN SELECT counterfrom AS from, counterto AS to,
floor((980000000 - date_part('epoch', counterstamp)) / 300) AS sequence
FROM graphs_5m WHERE line='absolonll'; NOTICE: QUERY PLAN:

Index Scan using graphs_5m_idx on graphs_5m (cost=0.00..58.38 rows=29
width=24)

EXPLAIN

and query runs for 3-5 seconds. Any idea how to make it faster? I think,
that now it's ready to HW upgrade for faster result ...

Best regards,
Robert

--
_
|-| __ Robert Vojta <vojta-at-ipex.cz> -= Oo.oO =-
|=| [Ll] IPEX, s.r.o.
"^" ====`o

Browse pgsql-hackers by date

  From Date Subject
Next Message Leslie 2001-07-27 14:57:16 PostgreSQL7.1 on AIX5L is running with too poor ferformance
Previous Message Robert Vojta 2001-07-27 12:57:13 Re: indexes and big tables