[Spacewalk-list] Query Continuously Running
Jan Pazdziora
jpazdziora at redhat.com
Mon Jan 16 19:17:06 UTC 2012
On Thu, Jan 12, 2012 at 03:41:39PM +0000, Wojtak, Greg (Superfly) wrote:
> Spacewalk 1.5 (PostgreSQL) on Cent 6
>
> I've been seeing a process keep popping up that uses as much cpu as it can get. It appears to be a delete transaction. I've run the following query in psql:
>
> select current_query from pg_stat_activity where current_query <> '<IDLE>' and current_query not like '%pg_stat_activity%';
>
> It appears that the query that is hanging is:
>
> DELETE FROM rhnPackageChangeLogData
> WHERE id NOT IN ( SELECT changelog_data_id FROM rhnPackageChangeLogRec )
>
> Any insight into this?
What does EXPLAIN say about the query?
Do things change if you ANALYZE the tables?
--
Jan Pazdziora
Principal Software Engineer, Satellite Engineering, Red Hat
More information about the Spacewalk-list
mailing list