On Wed, Jun 15, 2011 at 6:13 PM, JAGANADH G <[email protected]> wrote:

> Hi All
>
> I have database having 1 Lakh URLS and its content .
> I was trying to execute the following query and after 4 hours I got an
> error
> too
> I am pasting the query and error below. Is there anything wrong with the
> query
>
> select count(*) from `WCM-LN`.`reviews_index` where url in(Select link from
> urls)
> Error Code: 2013. Lost connection to MySQL server during query
>
>
MySql's subquery performance is not that great, esp. for large tables.

You could try running the query by joining the two tables.

Also an index on the fields you are joining will also help.

--
@pvsundarram <http://twitter.com/pvsundarram>
_______________________________________________
ILUGC Mailing List:
http://www.ae.iitm.ac.in/mailman/listinfo/ilugc

Reply via email to