homepage Welcome to WebmasterWorld Guest from 54.237.213.31
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / Databases
Forum Library, Charter, Moderator: open

Databases Forum

    
Problem with LEFT JOIN and big-data table
Problem with LEFT JOIN and big-data table
us22



 
Msg#: 4049528 posted 4:49 am on Dec 26, 2009 (gmt 0)

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

 

LifeinAsia

WebmasterWorld Administrator lifeinasia us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 4049528 posted 5:16 pm on Dec 28, 2009 (gmt 0)

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.

LifeinAsia

WebmasterWorld Administrator lifeinasia us a WebmasterWorld Top Contributor of All Time 5+ Year Member



 
Msg#: 4049528 posted 5:18 pm on Dec 28, 2009 (gmt 0)

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

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / Databases
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved