473,400 Members | 2,163 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,400 software developers and data experts.

What goes over the line when running a query?

16
Hey,

we use a lot of Access VBA applications with backend shared on a network drive and distributed frontend on the PC of the users. And we have some performance issues, mostly when users are not on the HQ LAN but on in a regional office over a WAN or from home by VPN.

I try to optimize the code of this applications (actually the application and the database should be redesigned but that is not an option now) but I don't know what data is going over the network when a query is launched. A lot of people here tell their own story, but I haven't found anyone who can explain me in detail how Access technically handles a query.
Does the application first reads the index(es) from the backend, and then only the data that meets the selection? Or is the full table read to the PC to make the selection? Are the indexes read once at the moment it makes the connection with the backend, or every time you do a selection?

I searched for more information about this issue but haven't found anything helpfull yet. So does somebody can explain some things, or does anyone know a good article about this?
Apr 3 '13 #1

✓ answered by zmbd

In VBA it can depend on how you open the record set AND on how the tables are setup.

The basic concept (and someone correct me if I have this wrong - PLEASE :) )
If the table is indexed and you run a basic stored query, the front end first checks for the availability of and INDEX on the all of the tables related to that query and pulls just the INDEX(s) to the front end, runs against the(se) index(s) and then pulls the related information until the buffer is filled (with a small cushion)... as the user moves thru the records then Access anticipates what the user is doing and may pre-fetch a few records on one side or the other
If the tables are not indexed then the entire table is attempted... this can cause performance issues if the table is large and/or the PC has a small amount of available RAM.
If there is a mix of indexed and non-indexed then the engine attempts to optimize the search method by attempting the search with indexs and moveing on from there.

In VBA it is my understanding that when one uses a snapshot or some of the other methods of opening a record set that all of the related records are pulled, dynamic works as above.

4 1086
zmbd
5,501 Expert Mod 4TB
In VBA it can depend on how you open the record set AND on how the tables are setup.

The basic concept (and someone correct me if I have this wrong - PLEASE :) )
If the table is indexed and you run a basic stored query, the front end first checks for the availability of and INDEX on the all of the tables related to that query and pulls just the INDEX(s) to the front end, runs against the(se) index(s) and then pulls the related information until the buffer is filled (with a small cushion)... as the user moves thru the records then Access anticipates what the user is doing and may pre-fetch a few records on one side or the other
If the tables are not indexed then the entire table is attempted... this can cause performance issues if the table is large and/or the PC has a small amount of available RAM.
If there is a mix of indexed and non-indexed then the engine attempts to optimize the search method by attempting the search with indexs and moveing on from there.

In VBA it is my understanding that when one uses a snapshot or some of the other methods of opening a record set that all of the related records are pulled, dynamic works as above.
Apr 3 '13 #2
zmbd
5,501 Expert Mod 4TB
Mind you these are both Wikipedia articles and as such it should be kept in mind that occationally things are not as on-point as it should be; however, with that in mind, the following are really very good reads and should help you understand how things are working with both the JET and ACE database engines.

Microsoft_Access (a history)

Microsoft_Jet_Database_Engine
Apr 3 '13 #3
Taaner
16
Thanks for the replies Z. Since we have both version 2003 and 2007 applications the history is part of the story.

And indeed it are the engines that handles this so I have to study how these work.

I already read some topics about the need of migrating .mdb's to .accdb's when every user is moved to Office 2007 or 2010. And it seems this can help for performance but in other cases repsonse times are worse? Do you (or someone else) have experience with this?
Apr 4 '13 #4
zmbd
5,501 Expert Mod 4TB
I've not seen any issues with either MDB or ACCDB, even for fairly large files. However, the HUGE files are stored on a either a SQL Server or a MYSQL server where I work.
Apr 6 '13 #5

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

Similar topics

0
by: tukaram.thatikonda | last post by:
Hi Guys, I have written a small windows application in VB.Net to test ADO.Net performance while executing long running query. The query works most of the time but fails sometime. I am trying...
4
by: Kory | last post by:
How do you stop a long running query with a SQLConnection or SQLCommand? Calling Close on either just waits until the query is done. Is there a way to stop it? The following on a long query ...
2
by: Giovanni | last post by:
Hello, I was playing with Visual C# Compiler version 8.00.40607.42. I made a simple example to test if the compiler was working fine. here is the code: using System; public class Start{
0
by: Peter Row | last post by:
Hi, I have written a DLL that implements IHttpHandler methods, i.e GetHandler, ProcessRequest etc... I also automatically login visitors to the site as an appropriate guest (based on browser...
7
by: iclinux | last post by:
Environment: WinXP SP2 + Python 2.4.2, with SOAPpy-0.11.6.zip, fpconst-0.7.2.zip, and PyXML-0.8.4.win32-py2.4.exe installed. Problem: I'm reading DiveIntoPython these days. When running code...
0
by: Guy | last post by:
I'm using a CreateUserWizard with an extra WizardStep. When the method "protected void CreateUserWizard1_CreatedUser(...) executes, using the debugger I can see all entered values except the...
5
by: Dan Fulbright | last post by:
I'm trying to install PHP 5.2.2 on Windows, but I keep getting errors when running go-pear.bat: mmap cache can't open phar://go-pear.phar/index.php mmap cache can't open...
0
by: Prabhakar78 | last post by:
How to tune long running query?Please any one can provide me the steps to tune long running query in DB2 V9.1.0 and the environment is AIX (OS)
5
by: Mario Suau | last post by:
I'm working on a C# server based application using Sql Compact 3.5 as the database. It's designed to run as a service. My problem is that when I run the service, the following line of code takes 15...
1
by: Tami Robinson | last post by:
I keep getting !Overflow error when running this query: SELECT DISTINCTROW FamilyInfo.FamilyInfoID ,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
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...
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...

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.