473,769 Members | 3,867 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5020
On Fri, 21 May 2004 12:17:35 +1200, "WindAndWav es" <ac****@ngaru.c om>
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.spa m.cox.net> wrote in message news:<u6******* *************** **********@4ax. com>...
On Fri, 21 May 2004 12:17:35 +1200, "WindAndWav es" <ac****@ngaru.c om>
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.c om> wrote in message
news:bd******** *************** **@posting.goog le.com...
Using a SQL update is ABSOLUTELY faster!

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

news:<u6******* *************** **********@4ax. com>...
On Fri, 21 May 2004 12:17:35 +1200, "WindAndWav es" <ac****@ngaru.c om>
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
"WindAndWav es" <ac****@ngaru.c om> wrote in message
news:Fb******** ***********@new s.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.c om> wrote in message
news:bd******** *************** **@posting.goog le.com...
Using a SQL update is ABSOLUTELY faster!

Tom van Stiphout <to*****@no.spa m.cox.net> wrote in message news:<u6******* *************** **********@4ax. com>...
On Fri, 21 May 2004 12:17:35 +1200, "WindAndWav es" <ac****@ngaru.c om>
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.co m (Rob) wrote in message news:<bd******* *************** ***@posting.goo gle.com>...
Using a SQL update is ABSOLUTELY faster!
Tom van Stiphout <to*****@no.spa m.cox.net> wrote in message news:<u6******* *************** **********@4ax. com>...
On Fri, 21 May 2004 12:17:35 +1200, "WindAndWav es" <ac****@ngaru.c om>
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.goo gle.com...
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.co m (Rob) wrote in message

news:<bd******* *************** ***@posting.goo gle.com>...
Using a SQL update is ABSOLUTELY faster!
Tom van Stiphout <to*****@no.spa m.cox.net> wrote in message news:<u6******* *************** **********@4ax. com>...
On Fri, 21 May 2004 12:17:35 +1200, "WindAndWav es" <ac****@ngaru.c om>
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*****@localh ost.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
"WindAndWav es" <ac****@ngaru.c om> 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.Execu te strSQL,dbfailon error command instead of
docmd.runsql. For ADO use CurrentProject. Connection.Exec ute strCommand,
lngRecordsAffec ted, adCmdText

If you're going to use docmd.setwarnin gs 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.execu te 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
4023
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 might be interested in the complex table optimizations. Please check it out at: http://www.somacon.com/aspdocs/ Hope you enjoy, Shailesh
60
10154
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 needed to use an ODBC link for the view because it needs to be editable. Otherwise, I would have used a pass-through query. In previous discussions about using an MDB file vs. an ADP file as a front end for SQL Server, the impression I got was that...
12
10618
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) from locations across a large network. California to Virginia. Naturally the east coast locations were running very slow. We decided to migrate to an Access front end with an SQL backend. The database contains several forms with multiple...
8
6492
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 using a code loop and an INSERT INTO query. About 800,000 records of raw text. Later, I can then loop through and parse these 800,000 strings into usable data using more code. The problem I have is that the conversion of the text file, using a...
0
9579
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10206
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10035
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9984
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8863
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5293
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5441
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3949
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2811
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.