MySQL Forums
Forum List  »  Newbie

Re: Out of memory for query
Posted by: David Wynter
Date: June 20, 2005 08:41AM

Thanks for the guidance. But I just realised it is not going to help me. The reason for the selection of the most recent by date grouped by col1 and col2 was to do an update on col4, setting it to 1 to represent the active row by latest date. This would occur every hour after processing a lot of records into this table. Of course being new to MySQL I did not realise I cannot use the SELECT in a subquery on that same tbl1 when doing an UPDATE.

If I could get a really performant query I would not then need the col4 == ACTIVE. But as this query might have to run several times an hour and the query you gave me is still running 30 minutes in ( although without the index you suggested) I get the feeling that I will need to have this ACTIVE col4.

Any suggestions on how to set this value in col4, maybe a temp table involved?

Thx.

David

Options: ReplyQuote


Subject
Written By
Posted
June 20, 2005 07:00AM
June 20, 2005 07:55AM
Re: Out of memory for query
June 20, 2005 08:41AM
June 20, 2005 10:24AM
June 20, 2005 11:15AM
June 20, 2005 04:29PM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.