> 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
PGP signature
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?
http://www.postgresql.org/search.mpl