ODBC Query very slow when using join but not when direct

th081

Board Regular
Joined
Mar 26, 2006
Messages
98
Office Version
  1. 365
Platform
  1. Windows
Hi,

I have a make table ODBC linked query, two tables (ODBC table) and a local table are linked by the date field in the local table the second field in the local table is the Month and year as below:

Apr-15 01/04/15
Apr-15 02/04/15
......
......
Apr-15 30/04/15

The macro launches a combo box and the user selects Apr-15 it then starts the make table query so that Apr-15 is one of the inputs and it querys the ODBC table for the 30 days in April that are listed in the local table. The issue is that all of a sudden this query has got very slow from a few mins to ~60mins. I have recreated the query in a separate database (new tables etc) but it is still very slow, this has just happened as last month it was ok. Interestingly if I remove the second table and enter the parameters manual i.e. between >=[start date] and <= [end date] the speed is back to normal. Does anyone have any clue why the same information returned (albeit requested in slightly different ways) could have such a difference in query times.

Could something have changed on the backend db and what might cause these diffs?

Regards
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
I would first ask have you thought about using SQL to join the tables you want and then querying the new table in an Excel sheet, then simply looking up the data from the sheet?
 
Upvote 0

Forum statistics

Threads
1,221,864
Messages
6,162,497
Members
451,770
Latest member
tsalaki

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top