I have used inner join before to select data from a database across tables but how can it be used in this example as I am doing two server calls which is slowing down the server response and hopefully inner join will remove this issue on a large database.
First Call - SELECT * FROM db1
while(
Second Call - SELECT name FROM db2 WHERE db1.x = db2.y
)
The while loop is just the loop through the original table result rows.
And then within the loop is the second call to get the name from the reference number.
I am trying to achieve a faster database call time as the current ‘double call’ takes around 10 seconds to complete due the vast number of table rows in the first instance.