Welcome to WebmasterWorld Guest from 54.205.88.118

Forum Moderators: open

Problem with LEFT JOIN and big-data table

Problem with LEFT JOIN and big-data table

   
4:49 am on Dec 26, 2009 (gmt 0)

5+ Year Member



Hello,

I have problem wtih make left join query in tow big table
the first one have more then 10,000 records

and second table have more then 35000 records

i make query below:


SELECT table1.code, table1.siteaddress, table1.plateno, table2.plateno FROM table1 JOIN table2 ON table1.plateno=table2.plateno LIMIT 1,10;

that query retrieve a good result but it's took long time to do that

and in my php interface i lost connection with server and also the result.

any one can help me.

NOTE: sorry my English is weak

5:16 pm on Dec 28, 2009 (gmt 0)

WebmasterWorld Administrator lifeinasia is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Those are not very big tables (we regularly deal with tables having 10s of millions of records), so that's not the issue. Make sure your tables are properly indexed- most likely you should have an index on the plateno field on each table.
5:18 pm on Dec 28, 2009 (gmt 0)

WebmasterWorld Administrator lifeinasia is a WebmasterWorld Top Contributor of All Time 5+ Year Member Top Contributors Of The Month



Oh, and welcome to Webmaster World [webmasterworld.com]! :)
 

Featured Threads

Hot Threads This Week

Hot Threads This Month