My SQL query takes too long

asked Jul 17, 2013 in Database by rooby (560 points)
I did a value and variable matching between two big sized tables from MySQL workbench 5.2 the query takes about an hour to finish. The query code I am using is
(select* from tableA as ta1 join tableB as ta2 on (ta1.z=ta2.z and ta1.y=ta2.y and ta1.c=ta2.c and ta1.b=ta2.b) where (abs(ta1.e-ta2.e)<=1)”.
I don’t have  MS SQL server to run this code .
Can anyone please advice
Thank you

1 Answer

0 like 0 dislike
answered Jul 17, 2013 by tareq101 (4,880 points)
You mentioned that you don’t have  MS SQL server to run your code . The best solution for this is to get a free SQL Server Express.