473,396 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

speed sql vs recordset

I was wondering if anyone knows what is faster: sql or recordset updates???
And if there are any other differences. At the moment I use docmd.runsql
throughout my database.


---
Please immediately let us know (by phone or return email) if (a) this email
contains a virus
(b) you are not the intended recipient
(c) you consider this email to be spam.
We have done our utmost to make sure that
none of the above are applicable. THANK YOU
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.688 / Virus Database: 449 - Release Date: 18/05/2004
Nov 12 '05 #1
8 4980
On Fri, 21 May 2004 12:17:35 +1200, "WindAndWaves" <ac****@ngaru.com>
wrote:

Do it both ways, and time the differences. The GetTickCount API call
is good for measuring time.

-Tom.

I was wondering if anyone knows what is faster: sql or recordset updates???
And if there are any other differences. At the moment I use docmd.runsql
throughout my database.


---
Please immediately let us know (by phone or return email) if (a) this email
contains a virus
(b) you are not the intended recipient
(c) you consider this email to be spam.
We have done our utmost to make sure that
none of the above are applicable. THANK YOU
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.688 / Virus Database: 449 - Release Date: 18/05/2004


Nov 12 '05 #2
Rob
Using a SQL update is ABSOLUTELY faster!

Tom van Stiphout <to*****@no.spam.cox.net> wrote in message news:<u6********************************@4ax.com>. ..
On Fri, 21 May 2004 12:17:35 +1200, "WindAndWaves" <ac****@ngaru.com>
wrote:

Do it both ways, and time the differences. The GetTickCount API call
is good for measuring time.

-Tom.

I was wondering if anyone knows what is faster: sql or recordset updates???
And if there are any other differences. At the moment I use docmd.runsql
throughout my database.


---
Please immediately let us know (by phone or return email) if (a) this email
contains a virus
(b) you are not the intended recipient
(c) you consider this email to be spam.
We have done our utmost to make sure that
none of the above are applicable. THANK YOU
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.688 / Virus Database: 449 - Release Date: 18/05/2004

Nov 13 '05 #3
thanks for that Rob - SQL seems to be a very fast tool and it is actually
very powerful in its simplicity

Great, I made the right choice!

One more little question: why are the domain aggregate functions (e.g.
dlookup) so slow and are there alternatives (I used them all the time.

CHeers

Nicolaas
"Rob" <si****@ensco.com> wrote in message
news:bd*************************@posting.google.co m...
Using a SQL update is ABSOLUTELY faster!

Tom van Stiphout <to*****@no.spam.cox.net> wrote in message

news:<u6********************************@4ax.com>. ..
On Fri, 21 May 2004 12:17:35 +1200, "WindAndWaves" <ac****@ngaru.com>
wrote:

Do it both ways, and time the differences. The GetTickCount API call
is good for measuring time.

-Tom.

I was wondering if anyone knows what is faster: sql or recordset updates???And if there are any other differences. At the moment I use docmd.runsqlthroughout my database.


---
Please immediately let us know (by phone or return email) if (a) this emailcontains a virus
(b) you are not the intended recipient
(c) you consider this email to be spam.
We have done our utmost to make sure that
none of the above are applicable. THANK YOU
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.688 / Virus Database: 449 - Release Date: 18/05/2004

---
Please immediately let us know (by phone or return email) if (a) this email
contains a virus
(b) you are not the intended recipient
(c) you consider this email to be spam.
We have done our utmost to make sure that
none of the above are applicable. THANK YOU
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.688 / Virus Database: 449 - Release Date: 18/05/2004
Nov 13 '05 #4
It used to be that people said that domain aggregate functions did not take
advantage of indexes, but others have said that is not the case. As far as I
know, Microsoft has not made any official comment on that issue.

Back when people thought the domain aggregate functions didn't use the
indexes, I saw a number of substitute functions that people had written on
the assumption that they would be faster, using DAO/SQL. I never saw one of
those actually timed, so don't know if they WERE faster.

My use of domain aggregate functions has generally been such that
performance was a minor issue, if an issue at all. Occasional use in code is
where they shine.

Larry Linson
Microsoft Access MVP
"WindAndWaves" <ac****@ngaru.com> wrote in message
news:Fb*******************@news.xtra.co.nz...
thanks for that Rob - SQL seems to be a very fast tool and it is actually
very powerful in its simplicity

Great, I made the right choice!

One more little question: why are the domain aggregate functions (e.g.
dlookup) so slow and are there alternatives (I used them all the time.

CHeers

Nicolaas
"Rob" <si****@ensco.com> wrote in message
news:bd*************************@posting.google.co m...
Using a SQL update is ABSOLUTELY faster!

Tom van Stiphout <to*****@no.spam.cox.net> wrote in message news:<u6********************************@4ax.com>. ..
On Fri, 21 May 2004 12:17:35 +1200, "WindAndWaves" <ac****@ngaru.com>
wrote:

Do it both ways, and time the differences. The GetTickCount API call
is good for measuring time.

-Tom.
>I was wondering if anyone knows what is faster: sql or recordset updates??? >And if there are any other differences. At the moment I use docmd.runsql >throughout my database.
>
>
>
>
>---
>Please immediately let us know (by phone or return email) if (a) this email >contains a virus
> (b) you are not the intended recipient
> (c) you consider this email to be spam.
>We have done our utmost to make sure that
>none of the above are applicable. THANK YOU
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.688 / Virus Database: 449 - Release Date: 18/05/2004
>

---
Please immediately let us know (by phone or return email) if (a) this

email contains a virus
(b) you are not the intended recipient
(c) you consider this email to be spam.
We have done our utmost to make sure that
none of the above are applicable. THANK YOU
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.688 / Virus Database: 449 - Release Date: 18/05/2004

Nov 13 '05 #5
I'd caution you about making a presumption that SQL is always faster.
For almost all standard queries this is undoubtable true but sometimes
complex queries can be done faster in code and measuring it, as Tom
points out, would be justified where query performance is lacking.

'---------------
' John Mishefske
'---------------

si****@ensco.com (Rob) wrote in message news:<bd*************************@posting.google.c om>...
Using a SQL update is ABSOLUTELY faster!
Tom van Stiphout <to*****@no.spam.cox.net> wrote in message news:<u6********************************@4ax.com>. ..
On Fri, 21 May 2004 12:17:35 +1200, "WindAndWaves" <ac****@ngaru.com>
wrote:

Do it both ways, and time the differences. The GetTickCount API call
is good for measuring time.

-Tom.

Nov 13 '05 #6
I once worked in an organization which had a very knowledgeable and thorough
"quality manager" who reviewed all proposals and deliverables. He noted that
"always", "every", "none", and "never" are very strong statements that we
usually would be well-advised to avoid. <GRIN>

But, I agree: in most instances, you get advantage of the optimization built
into the database engine by using SQL or Queries, while you are "on your
own" in code. But, you may "luck out" sometimes and do code that beats
particular SQL.

Larry Linson
Microsoft Access MVP

"almish" <mi****@execpc.com> wrote in message
news:95**************************@posting.google.c om...
I'd caution you about making a presumption that SQL is always faster.
For almost all standard queries this is undoubtable true but sometimes
complex queries can be done faster in code and measuring it, as Tom
points out, would be justified where query performance is lacking.

'---------------
' John Mishefske
'---------------

si****@ensco.com (Rob) wrote in message

news:<bd*************************@posting.google.c om>...
Using a SQL update is ABSOLUTELY faster!
Tom van Stiphout <to*****@no.spam.cox.net> wrote in message news:<u6********************************@4ax.com>. ..
On Fri, 21 May 2004 12:17:35 +1200, "WindAndWaves" <ac****@ngaru.com>
wrote:

Do it both ways, and time the differences. The GetTickCount API call
is good for measuring time.

-Tom.

Nov 13 '05 #7
"Larry Linson" <bo*****@localhost.not> wrote:
I once worked in an organization which had a very knowledgeable and thorough
"quality manager" who reviewed all proposals and deliverables. He noted that
"always", "every", "none", and "never" are very strong statements that we
usually would be well-advised to avoid. <GRIN>


Yup, I've had to change my posts occasionally due to this as other folks have pointed
out that I was completely wrong. <smile>

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 13 '05 #8
"WindAndWaves" <ac****@ngaru.com> wrote:
And if there are any other differences. At the moment I use docmd.runsql
throughout my database.


I prefer, if DAO, to use Currentdb.Execute strSQL,dbfailonerror command instead of
docmd.runsql. For ADO use CurrentProject.Connection.Execute strCommand,
lngRecordsAffected, adCmdText

If you're going to use docmd.setwarnings make very sure you put the True statement in
any error handling code as well. Otherwise wierd things may happen later on
especially while you are working on the app. For example you will no longer get the
"Do you wish to save your changes" message if you close an object. This may mean
that unwanted changes, deletions or additions will be saved to your MDB.

Also performance can be significantly different between the two methods. One posting
stated currentdb.execute took two seconds while docmd.runsql took eight seconds. As
always YMMV.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 13 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

17
by: Shailesh Humbad | last post by:
I just posted an article I wrote called ASP Speed Tricks. It covers techniques to optimize output of database data in HTML, for both simple tables and complex tables. More advanced ASP authors...
60
by: Neil | last post by:
I have a situation with an ODBC linked view in an Access 2000 MDB with a SQL 7 back end. The view is scrolling very slowly. However, if I open the view in an ADP file, it scrolls quickly. I...
12
by: Matt.W.Stephens | last post by:
Here is the scenario. We have a database with patient case information. This database was previously solely used in Access. The problem is our users connect to this database (located in California)...
8
by: SaltyBoat | last post by:
Needing to import and parse data from a large PDF file into an Access 2002 table: I start by converted the PDF file to a html file. Then I read this html text file, line by line, into a table...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.