MySQL Forums
Forum List  »  Newbie

Re: How to optimise this
Posted by: Phillip Ward
Date: September 29, 2017 04:51AM

We're all part-time volunteers around here; we chip in where and when we can ...

Quote

SELECT * FROM FOLLOWERSFRIEND as ff, FOLLOWER as f WHERE f.FOLLOWER_id = ff.FOLLOWER_id and f.USER_id = '1269856500' and f.FOLLOWER_dateGotFollowing is not null group by f.FOLLOWER_id, ff.FOLLOWERSFRIEND_id limit 650000

It takes a while to run, that's for sure

Even if this query worked, what did you intend to do with [anything up to] 650K rows?

How many rows does this return?
SELECT f.USER_id 
FROM   FOLLOWER as f 
WHERE  f.USER_id = '1269856500' ;

How long does it take to run?

Show us the output of "show create table X \g" for each table.

Regards, Phill W.

Options: ReplyQuote


Subject
Written By
Posted
September 27, 2017 12:58PM
September 28, 2017 11:03PM
September 29, 2017 09:37AM
October 03, 2017 07:50AM
October 03, 2017 12:10PM
December 30, 2017 10:53AM
December 30, 2017 01:31PM
Re: How to optimise this
September 29, 2017 04:51AM


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.