Linked tables vs sub queries from another database

HerrSober

New Member
Joined
Aug 30, 2013
Messages
40
Hi all,

Just wondering, is there a difference performance wise on linking to a table in another database and running a Query for it? (like "SELECT * FROM tblExample in C:\example.accdb;"

Thanks for your help!
Sober
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
A lot depends on where the other database is located. If it is on the same server, it is not a big deal.

Actually, it is recommended that for a multi-user database, that you actually "split" the data into two databases; a back-end that that contains all the data tables, and a front-end which contains all queries, forms, reports, and VBA. So in that split environment, ALL the table references in the front-end are linked tables.

So using linked tables should not be a problem, especially in they are on the same network.
 
Upvote 0
A lot depends on where the other database is located. If it is on the same server, it is not a big deal.

Actually, it is recommended that for a multi-user database, that you actually "split" the data into two databases; a back-end that that contains all the data tables, and a front-end which contains all queries, forms, reports, and VBA. So in that split environment, ALL the table references in the front-end are linked tables.

So using linked tables should not be a problem, especially in they are on the same network.

Thanks for your answer Joey. I currently split the databases and refer to the table from the front end.

I see that when being in Design View, when I use linked tables via the graphical interface I can also see the primary key symbol, but when I instead refer to the table with using SQL Query I don't.

Will using the linked tables approach result in better data retrieval since it is possible with direct connection with the primary key for the tables involved?
 
Upvote 0
but when I instead refer to the table with using SQL Query I don't
I am not quite clear what you mean here. Is your data in SQL, or are you just referring to the SQL View in the query.
Regardless, when you link tables, they maintain all the same properties as they do in their native tables (you won't lose primary keys, indexes, or anything like that).
 
Upvote 0
I am not quite clear what you mean here. Is your data in SQL, or are you just referring to the SQL View in the query.
Regardless, when you link tables, they maintain all the same properties as they do in their native tables (you won't lose primary keys, indexes, or anything like that).

I mean by refering to the table by using such SQL statement: SELECT * from tblExternal in "C:\Externaldatabase.accdb";

Still same properties as if I have used the graphical interface to create a linked table?
 
Upvote 0
It should be. All the graphical interface does is build the SQL behind the scenes. You can actually create queries by using the graphical interface or by writing the SQL code directly. It shouldn't destroy any of the properties inherent to the tables you are referencing in them.
 
Upvote 0
It should be. All the graphical interface does is build the SQL behind the scenes. You can actually create queries by using the graphical interface or by writing the SQL code directly. It shouldn't destroy any of the properties inherent to the tables you are referencing in them.


Thanks. Excatly how I expected :)
 
Upvote 0

Forum statistics

Threads
1,221,831
Messages
6,162,250
Members
451,757
Latest member
iours

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