Slow

  • Thread starter Thread starter Crystal
  • Start date Start date
C

Crystal

I have one particular form in my database that is
notoriously slow. It's not control heavy but there is a
lot of code behind it. Much of it is updating a table via
DAO. I was wondering if it would be any faster to use SQL
commands (db.Execute(strSQL)) or a stored update query?

Are stored update queries or SQL statements faster than
DAO?

Crystal
 
Crystal said:
I have one particular form in my database that is
notoriously slow. It's not control heavy but there is a
lot of code behind it. Much of it is updating a table via
DAO. I was wondering if it would be any faster to use SQL
commands (db.Execute(strSQL)) or a stored update query?

Are stored update queries or SQL statements faster than
DAO?

As a rule, yes. Especially if you have code that loops through a
recordset to update each record, an update query that acts on all the
records at once will be much faster. Or if you open a lot of
recordsets, or open a recordset over and over, that will be quite slow.

Also, if you are using code that repeatedly calls the CurrentDb
function, that will be slower than if you call CurrentDb once and assign
the value to a Database object, then use that Database object repeatedly
when you need to.
 
Back
Top