MySQL Forums
Forum List  »  General

Re: search for query that result one random url from domain
Posted by: Rick James
Date: December 08, 2011 10:02PM

A partial solution:
1. Change the charset of domain to latin1. (After all, why would the domain be in utf8 if the url is in latin1?)
2. ADD INDEX(domain, url)

Note: MyISAM has a limite of 1000 bytes for indexes, hence the need to switch to latin1.

This INDEX will allow the subquery to be performed "Using index". If you are currently disk bound, this will help a lot.

Does my query actually provide the 'right' answer for you?

How often do you need to run this query? Does it matter if two users get the same answer? (I am fishing for ways to give the user the appearance of speeding up the query.)

Options: ReplyQuote


Subject
Written By
Posted
Re: search for query that result one random url from domain
December 08, 2011 10:02PM


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.