473,322 Members | 1,911 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,322 software developers and data experts.

How efficient are the SQL Insert Into and Update commands?

beacon
579 512MB
Hi everybody,

[Access 2003]

Does anyone know the difference, performance wise, between using SQL commands, like Insert Into and Update, to enter data into a table from unbound fields on a form, as opposed to entering data into a table with bound fields?

I'm working on a database that I'm considering creating entirely using VBA (part out of necessity and part out of curiousity), but wanted to know if this would cause huge discrepancies in the efficiency of the forms individually or the database overall.

Thanks,
beacon
Feb 10 '11 #1

✓ answered by Stewart Ross

Although using unbound forms with VBA is likely to be less efficient I doubt that you'd notice the difference in practice, Beacon.

Access is designed to work with bound data in its forms front-end and is optimised for doing so. Whatever code it is running is fully compiled, and the JET database engine has benefitted from many years of development.

If you work with unbound forms then you are having to do all the work yourself, and as you are using semi-compiled VBA (running in an interpreted environment where only partial compilation takes place) as opposed to native fully-compiled code then theoretically you might notice a drop in performance.

Unless you are doing complex processing of recordset data in VBA between records or after immediate data entry I doubt that you will notice any real difference in practice, as user data entry is inherently much slower than the performance of the VBA interpreter running a simple SQL update or insert behind the scenes.

If you are doing a lot of screen refresh and manipulation of data in your unbound forms you may also notice the time taken to do so, but if it is a simple forms interface then it is unlikely to be a problem.

I've found much more of a performance hit occurs when using features new to A2007 such as conditional formatting of fields, as the evaluation of the conditions can cripple performance in some circumstances. As there is no conditional formatting in A2003 it does not arise in your case!

-Stewart

2 2241
Stewart Ross
2,545 Expert Mod 2GB
Although using unbound forms with VBA is likely to be less efficient I doubt that you'd notice the difference in practice, Beacon.

Access is designed to work with bound data in its forms front-end and is optimised for doing so. Whatever code it is running is fully compiled, and the JET database engine has benefitted from many years of development.

If you work with unbound forms then you are having to do all the work yourself, and as you are using semi-compiled VBA (running in an interpreted environment where only partial compilation takes place) as opposed to native fully-compiled code then theoretically you might notice a drop in performance.

Unless you are doing complex processing of recordset data in VBA between records or after immediate data entry I doubt that you will notice any real difference in practice, as user data entry is inherently much slower than the performance of the VBA interpreter running a simple SQL update or insert behind the scenes.

If you are doing a lot of screen refresh and manipulation of data in your unbound forms you may also notice the time taken to do so, but if it is a simple forms interface then it is unlikely to be a problem.

I've found much more of a performance hit occurs when using features new to A2007 such as conditional formatting of fields, as the evaluation of the conditions can cripple performance in some circumstances. As there is no conditional formatting in A2003 it does not arise in your case!

-Stewart
Feb 10 '11 #2
beacon
579 512MB
Thanks Stewart
Feb 10 '11 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

16
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums...
1
by: nicholas | last post by:
Where can I find a good tutorial on how to insert/update MULTIPLE rows into a database on an SQL2000 server ? In VB !! (not C#) THX
3
by: Shapper | last post by:
Hello, I have created 3 functions to insert, update and delete an Access database record. The Insert and the Delete code are working fine. The update is not. I checked and my database has all...
3
by: RJN | last post by:
Hi I'm using the Dataadapter and Dataset to do an insert/update/delete into tables. The dataset has multiple tables in it. I want to write my own Update/Insert commands for the Dataadapter for...
6
by: Tom Allison | last post by:
I seemed to remember being able to do this but I can't find the docs. Can I run a sql query to insert new or update existing rows in one query? Otherwise I have to run a select query to see if...
10
by: cj | last post by:
I have lots of tables to copy from one server to another. The new tables have been created to match the old ones. I practiced with one table. I created the select command (select * from tableA)...
3
by: John Cosmas | last post by:
I have a DATATABLE which I have populated in my application, and I need it written out to a particular table I specify in my ACCESS database. My code works to the point of the MERGE and UPDATE,...
13
by: =?Utf-8?B?VmVybm9uIFBlcHBlcnM=?= | last post by:
I am using VS2005. I created a Windows Appication project. Inside the Server Explorer, I created a new SQLExpress database, and then created a new table. I added the rows, making my first row an...
0
by: kumardharanik | last post by:
Hi Friends, The below code is a sample code for insert, update and delete using datagrid but i need to convert the entire code for datagridview.. Plsss help me.. using System; using...
7
by: ndhvu | last post by:
Tables: Buy_Header and Buy_Detail. - Buy_Header: info. of each buy (buy_id(PK, auto number), date, shop, bought_by, ...) - Buy_Detail: info. of each item from each buy (buy_detail_id(PK, auto...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.