From: | Jayadevan <maymala(dot)jayadevan(at)gmail(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Query - CPU issue |
Date: | 2013-09-19 03:18:12 |
Message-ID: | 1379560692965-5771552.post@n5.nabble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
Kevin Grittner-5 wrote
> What is the longest you have let it run, in hours or minutes?
I let it run for about 10 minutes and killed it.
Kevin Grittner-5 wrote
> By the way, IMMUTABLE has to be wrong here, since the results
> depend on the state of the database. STABLE is likely the right
> designation.
The data will not change unless I do a reload of the data set manually. In
that case, is IMMUTABLE wrong?
Here is the EXPLAIN (no analyze)
explain
select distinct geoip_city(src_ip) , src_ip
from alert where timestamp>=1378512000 and timestamp < 1378598400;
QUERY PLAN
---------------------------------------------------------------------------------------------
Unique (cost=3815.75..3894.61 rows=39 width=8)
-> Sort (cost=3815.75..3842.04 rows=10515 width=8)
Sort Key: (geoip_city(src_ip)), src_ip
-> Index Scan using idx_alert_ts on alert (cost=0.29..3113.34
rows=10515 width=8)
Index Cond: (("timestamp" >= 1378512000) AND ("timestamp" <
1378598400))
(5 rows)
--
View this message in context: http://postgresql.1045698.n5.nabble.com/Query-CPU-issue-tp5771421p5771552.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2013-09-19 04:03:11 | Re: Query - CPU issue |
Previous Message | CR Lender | 2013-09-19 01:20:03 | Re: How to know if a query is semantically correct without execute it? |