mahmed1
Well-known Member
- Joined
- Mar 28, 2009
- Messages
- 2,302
- Office Version
- 365
- 2016
- Platform
- Windows
Hi Lovely People
i have a database which is around 100kb in size
Within that i have table called Tbl_All_Data
If i run a simple query like this in Access - its quick
SELECT date_, dept, sum(total)
FROM tbl_Incoming
WHERE date_ >= #01/04/2020 AND date_ <= #30/04/2020
GROUP BY date_, dept
takes around 4-5 seconds
now if i run this same query in Excel using open recordset it takes around 4-5 minutes to run
rs.Open sqlString is the part it takes ages
the SQL string is exactly the same as I posted but put into the variable sqlString
so nothing has changed and my excel file is small and all other SQL statements etc run supee quuick - its just this from excel that takes long
is there anything you can advise i add to speed it up?
i have a database which is around 100kb in size
Within that i have table called Tbl_All_Data
If i run a simple query like this in Access - its quick
SELECT date_, dept, sum(total)
FROM tbl_Incoming
WHERE date_ >= #01/04/2020 AND date_ <= #30/04/2020
GROUP BY date_, dept
takes around 4-5 seconds
now if i run this same query in Excel using open recordset it takes around 4-5 minutes to run
rs.Open sqlString is the part it takes ages
the SQL string is exactly the same as I posted but put into the variable sqlString
so nothing has changed and my excel file is small and all other SQL statements etc run supee quuick - its just this from excel that takes long
is there anything you can advise i add to speed it up?