| View previous topic :: View next topic |
| Author |
Message |
adminaia
Joined: 27 Apr 2009 Posts: 5
|
Posted: Thu Mar 15, 2012 11:18 am Post subject: Slow Join |
|
|
Hello!
I'm working with apatar for a week and i think it is easy to learn. Brings fast solutions.
But today i faced a big problem while JOINING two MYSQL tables with about 370k records in. Each!
I build a first connector to table CONTACT and a second one to table ADRESS. Joining them all took hours (days?). I killed the job meanwhile.
Reducing the amount of values with WHERE lastname = 'smith' in table1 and where country = 'italy' in table2 will produce a fast result.
My second approach was to use the generic ODBC connector for mysql. It is faster to configure but i can not select different values with WHERE.
Any idea how to speed up? |
|
| Back to top |
|
 |
Sergei
Joined: 26 Jul 2007 Posts: 969
|
Posted: Thu Mar 15, 2012 12:57 pm Post subject: |
|
|
Hello,
You may try to write SQL query within MySQL connector to join two tables instead of using Join node. It would definitely speed up the process. _________________ Regards,
Sergei |
|
| Back to top |
|
 |
adminaia
Joined: 27 Apr 2009 Posts: 5
|
Posted: Fri Mar 16, 2012 8:21 am Post subject: |
|
|
Thanks for your answer,
it is pretty fast now!  |
|
| Back to top |
|
 |
adminaia
Joined: 27 Apr 2009 Posts: 5
|
Posted: Mon Mar 19, 2012 8:34 am Post subject: |
|
|
Ok, but actually I faced a problem joining 3 tables with inner join.
Two tables work fine:
Select * From `vtiger_contactdetails` Inner Join `vtiger_contactaddress` On contactid = contactaddressid
But this won't:
Select * From (`vtiger_contactdetails` Inner Join `vtiger_contactaddress` On contactid = contactaddressid) Inner Join `vtiger_contacscf` on vtiger_contactdetails.contactid = vtiger_contactcf.contactid
Or can I access a MySQL-View somehow? |
|
| Back to top |
|
 |
adminaia
Joined: 27 Apr 2009 Posts: 5
|
Posted: Wed Mar 21, 2012 9:38 am Post subject: |
|
|
I speed up Join-Node #1 by filtering my 1st MySql-Node.
And my second Join-Node has only 20.000 values to match.
But it would be very nice if someone could check how to JOIN
3 tables in ONE SQL-Node.
Greetings |
|
| Back to top |
|
 |
|