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

Back End Access DB & Jet Engine

dima69
181 Expert 100+
Hi guys,

Thanks to a lot of luck and help from you great people, I am on the verge of completing my first Database/Application.

but at the moment the Jet Engine back end is not able to handle the load

here are some specs re my database:
Back End: Access -> Jet Engine
Front Ends: Access -> Jet Engine
usually not more than 2 users accessing the database and the back end is stored on one of the users computers which is quite a new computer.

Here are some structural mistakes I believe that could be causing the problem:

1. Whenever I add a new record, I use ADO to connect to an entire table as a recordset, I would think that would be putting unnecessary load on the Jet back end, what is the most streamlined way to add a new record to a recordset.

2. I have external query objects (in the front ends), will external query objects put more load on my front end then SQL strings in VBA would?

Thank You Very Much
I am not sure what the problem is, however I think you do take one thing wrong.
Access database Back End never uses Jet Engine or anything else - it's just a file server. All data is processed at the Front End. So when you have a big table and you run a query to select a few records, the whole table must be transfered to the Front End anyway.
May 17 '07 #1
21 2472
NeoPa
32,556 Expert Mod 16PB
  1. Opening a table will generally not load all the data. This is a non-issue. Let Access handle it.
  2. If you mean QueryDefs in your front end, then it's actually better to use them than a VBA SQL string. The former are 'optimised' on first use. A SQL string needs to have optimisation guesses done every time it's run. The Jet Engine will work quite happily on the Back End database.

PS. I don't like to contradict other Experts (so apologies for that Dima) but I think I'm right on this occasion. I would be happy to be proved wrong if there's something I need to learn. I may ask some other Experts to have a look in to check.
May 26 '07 #2
missinglinq
3,532 Expert 2GB
"Let Access handle it."

I have to say that I think this is one of the best pieces of advise that has ever been offered on this or any other Access forum! After all these years, it still amazes me how often people will insist on re-inventing the wheel! Granted, Access isn't perfect; there are some things that can be done better in Access by "rolling your own," but overall, if Access offers it, it'll be more economical than writing your own hack! How many times have we all read a post asking "How can I retrieve a certain record using the ID\Client Name\Company Name?" when a combo box option exists for this very purpose! Even more amazing, to me, is that someone will respond telling the OP to use a combobox, and then proceed to give half a page of code to accomplish the task, when the Combobox Wizard will accomplish the same thing in about 60 seconds!

To everyone on this side of The Pond, have a great Memorial Day! And a special "Thank you!" to all the veterans out there, no matter which side of The Pond you're on, even those "Down Under!"
May 26 '07 #3
Killer42
8,435 Expert 8TB
I'm inclined to agree partly with both dima69 and NeoPa.

If both front- and back-end are Access, then it will be the "front-end PC" doing all of the processing, while the back-end is simply a shared file, regardless of where it lives. That's why we go to SQL Server for larger projects, as that unloads a lot of work to the server (back-end) and greatly reduces network traffic.

However, my (limited) experience would tend to support NeoPa in his assertion that opening a dataset does not necessarily read all of the records, and will thus not place a large load on the front-end, back-end or network.

That is, unless you are dealing with UNION queries, which appear to completely change the rules.

In this sort of case, I would suggest "if in doubt, try it out". Find or create a very large table (millions of records) and open it the intended way from the front-end. You will soon be able to tell whether you are reading the entire dataset or not.
May 27 '07 #4
dima69
181 Expert 100+
I'm inclined to agree partly with both dima69 and NeoPa.

If both front- and back-end are Access, then it will be the "front-end PC" doing all of the processing, while the back-end is simply a shared file, regardless of where it lives. That's why we go to SQL Server for larger projects, as that unloads a lot of work to the server (back-end) and greatly reduces network traffic.

However, my (limited) experience would tend to support NeoPa in his assertion that opening a dataset does not necessarily read all of the records, and will thus not place a large load on the front-end, back-end or network.

That is, unless you are dealing with UNION queries, which appear to completely change the rules.

In this sort of case, I would suggest "if in doubt, try it out". Find or create a very large table (millions of records) and open it the intended way from the front-end. You will soon be able to tell whether you are reading the entire dataset or not.
I've done some testing with large table (1M records, on the LAN) comparing 4 cases:
1. Opening Dynaset-type DAO recordset on the whole table and populating the records (movelast)
2. The same with Snapshot-type recordset
3. Running SELECT query returning one record, based on simple criteria on indexed field.
4. The same with criteria on non-indexed field

The results are:
1. Opening Snapshot-type recordset (as if copying all data to local computer) is the same time as running a query, whith a criteria on non-indexed field.
I guess this test proves my previous point that the whole table must be brought from BE to run a query :)
2. Running the query with a criteria on indexed field is very fast.
3. Opening Dynaset-type recordset is much faster than opening Snapshot recordset (I guess it's because the data is not transfered as in case of snapshot)
May 27 '07 #5
NeoPa
32,556 Expert Mod 16PB
I've done some testing with large table (1M records, on the LAN) comparing 4 cases:
1. Opening Dynaset-type DAO recordset on the whole table and populating the records (movelast)
2. The same with Snapshot-type recordset
3. Running SELECT query returning one record, based on simple criteria on indexed field.
4. The same with criteria on non-indexed field

The results are:
1. Opening Snapshot-type recordset (as if copying all data to local computer) is the same time as running a query, whith a criteria on non-indexed field.
I guess this test proves my previous point that the whole table must be brought from BE to run a query :)
2. Running the query with a criteria on indexed field is very fast.
3. Opening Dynaset-type recordset is much faster than opening Snapshot recordset (I guess it's because the data is not transfered as in case of snapshot)
  1. Surely this proves only that you've used MoveLast? This would behave the same way whether a FE/BE were used or a simple (and single) database.
  2. This proves? that the Jet Engine is able to work quite happily with the BE data. If this were not so, then surely this could only produce the results after the whole table is loaded?
  3. Further indication, if it were needed, that the BE database is processed by Jet rather than simply as a repository of unindexed data.
From your points, I'm starting to wonder if we're not talking at some level of cross-purposes?
May 27 '07 #6
NeoPa
32,556 Expert Mod 16PB
I'm inclined to agree partly with both dima69 and NeoPa.

If both front- and back-end are Access, then it will be the "front-end PC" doing all of the processing, while the back-end is simply a shared file, regardless of where it lives. That's why we go to SQL Server for larger projects, as that unloads a lot of work to the server (back-end) and greatly reduces network traffic.

However, my (limited) experience would tend to support NeoPa in his assertion that opening a dataset does not necessarily read all of the records, and will thus not place a large load on the front-end, back-end or network.

That is, unless you are dealing with UNION queries, which appear to completely change the rules.

In this sort of case, I would suggest "if in doubt, try it out". Find or create a very large table (millions of records) and open it the intended way from the front-end. You will soon be able to tell whether you are reading the entire dataset or not.
Your points, while valid, don't seem to reflect the FE/BE situation any more than they do a simple database. A single database reflects the same issues with UNION queries as you've discovered in your BE database, doesn't it?
May 27 '07 #7
NeoPa
32,556 Expert Mod 16PB
The original question (Novice Mistakes that could be crashing Access) is still ongoing, but further discussions on this topic (Back End Access DB & Jet Engine) should remain in here please.
May 27 '07 #8
ADezii
8,834 Expert 8TB
I am not sure what the problem is, however I think you do take one thing wrong.
Access database Back End never uses Jet Engine or anything else - it's just a file server. All data is processed at the Front End. So when you have a big table and you run a query to select a few records, the whole table must be transfered to the Front End anyway.
--------------------------------------------------------------------------
Mastering Microsoft Office Access 2003 by
Alison Balter
Copyrighted by SAMS Publishing
Page 10

--------------------------------------------------------------------------

If you develope an application that stores the data on a File Server on an Access Database, the workstation performs all data processing. This means that everytime the user runs a Query or Report, the File Server returns all the data to the workstation. The workstation than runs the Query and displays the results in a datasheet or on a report. This process generates a significant amount of network traffic, particularly if multiple users are running reports and queries at the same time on large Access tables. In fact, such operations can bring the entire network to a crawl.

A Client/Server database, such as SQL Server or Oracle, processes queries on the Server machins and returns results to the workstation. The Server software can't display data to the user, so this is where Access comes to the rescue...
May 27 '07 #9
NeoPa
32,556 Expert Mod 16PB
--------------------------------------------------------------------------
Mastering Microsoft Office Access 2003 by
Alison Balter
Copyrighted by SAMS Publishing
Page 10

--------------------------------------------------------------------------

If you develope an application that stores the data on a File Server on an Access Database, the workstation performs all data processing. This means that everytime the user runs a Query or Report, the File Server returns all the data to the workstation. The workstation than runs the Query and displays the results in a datasheet or on a report. This process generates a significant amount of network traffic, particularly if multiple users are running reports and queries at the same time on large Access tables. In fact, such operations can bring the entire network to a crawl.

A Client/Server database, such as SQL Server or Oracle, processes queries on the Server machins and returns results to the workstation. The Server software can't display data to the user, so this is where Access comes to the rescue...
I believe this quote is referring to the advisability (or otherwise) of storing the database remotely (across a network) rather than the use of a FE/BE model. FE/BE databases can both be stored on an individual PC, they can both be stored on a server (across a network) and they can be stored as FE on local PC with BE on a server. Any databases, whether FE or BE, which are stored remotely, across a network, will suffer from having to transfer the data (whatever data is requested) across the much slower medium of the network. This is NOT a FE/BE issue, but a general network one.
Where the book refers to :
the File Server returns all the data to the workstation.
the all data refers to everything requested by the PC. In this case, the PC is running the Jet Engine, so any requests to a BE database, are intelligently controlled by this, so that it only requests the same data as it would on a local PC. It will NOT need to request the data from the whole table (necessarily), any more than it would need to if it were processing data stored on the local hard drive.
May 27 '07 #10
ADezii
8,834 Expert 8TB
I believe this quote is referring to the advisability (or otherwise) of storing the database remotely (across a network) rather than the use of a FE/BE model. FE/BE databases can both be stored on an individual PC, they can both be stored on a server (across a network) and they can be stored as FE on local PC with BE on a server. Any databases, whether FE or BE, which are stored remotely, across a network, will suffer from having to transfer the data (whatever data is requested) across the much slower medium of the network. This is NOT a FE/BE issue, but a general network one.
Where the book refers to :
the all data refers to everything requested by the PC. In this case, the PC is running the Jet Engine, so any requests to a BE database, are intelligently controlled by this, so that it only requests the same data as it would on a local PC. It will NOT need to request the data from the whole table (necessarily), any more than it would need to if it were processing data stored on the local hard drive.
  1. From the Original Post - wouldn't his imply a FE on Local PC/BE on Server scenario?
    the back end is stored on one of the users computers which is quite a new computer.
  2. Given this scenario, it is not a matter of Requests but where the processing is performed. Since the processing would be performed on the Client (FE) in this case, it would have no choice but to download the entire Table contents, process it, and return a result set. If a single Record was returned from 100,000, all 100,000 Records would still have to be sent to the FE for processing.
  3. You gotta love this discussion stuff.
May 27 '07 #11
dima69
181 Expert 100+
  1. Surely this proves only that you've used MoveLast? This would behave the same way whether a FE/BE were used or a simple (and single) database.
  2. This proves? that the Jet Engine is able to work quite happily with the BE data. If this were not so, then surely this could only produce the results after the whole table is loaded?
  3. Further indication, if it were needed, that the BE database is processed by Jet rather than simply as a repository of unindexed data.
From your points, I'm starting to wonder if we're not talking at some level of cross-purposes?
The point here was to show that even if you restrict the returned data using query it takes the same time as returning the whole table, since both cases require bringing the whole table to the FE. Of cause, not all operations require all data to be processed instantly (like in case of dynaset). So I tend to agree with ADezii on this one.
May 27 '07 #12
NeoPa
32,556 Expert Mod 16PB
  1. From the Original Post - wouldn't his imply a FE on Local PC/BE on Server scenario?
    the back end is stored on one of the users computers which is quite a new computer.
  2. Given this scenario, it is not a matter of Requests but where the processing is performed. Since the processing would be performed on the Client (FE) in this case, it would have no choice but to download the entire Table contents, process it, and return a result set. If a single Record was returned from 100,000, all 100,000 Records would still have to be sent to the FE for processing.
  3. You gotta love this discussion stuff.
  1. No. It simply states that the BE is on a single PC, which must be across the network for at least some of the PCs using it. Nothing I can see puts the FE on a local PC.
  2. That is simply not true. The Jet engine is running on the PC so will make requests of the BE just as it would of the FE, wherever they are stored. If every query loaded all the records then we may as well not use an RDBMS at all. Please refer to dima's post #5 for examples of BE queries finishing well before they could if all data were transferred in that un-RDBMS way.
  3. :) I certainly do love a good argu... discussion :D
May 27 '07 #13
NeoPa
32,556 Expert Mod 16PB
The point here was to show that even if you restrict the returned data using query it takes the same time as returning the whole table, since both cases require bringing the whole table to the FE. Of cause, not all operations require all data to be processed instantly (like in case of dynaset). So I tend to agree with ADezii on this one.
But it doesn't.
You're other points showed that quite clearly and unambiguously.
If you say explicitly in your code "Load all the data from the table." (MoveLast), then how can you use that to support the idea that the BE forces all the data to be loaded. Clearly it's not the BE at all but your code (MoveLast) which causes this.
May 27 '07 #14
dima69
181 Expert 100+
But it doesn't.
You're other points showed that quite clearly and unambiguously.
If you say explicitly in your code "Load all the data from the table." (MoveLast), then how can you use that to support the idea that the BE forces all the data to be loaded. Clearly it's not the BE at all but your code (MoveLast) which causes this.
It was not the MoveLast I was checking - I just used it as a reference to evaluate the query performance, which showed to be the same.
May 27 '07 #15
NeoPa
32,556 Expert Mod 16PB
It was not the MoveLast I was checking - I just used it as a reference to evaluate the query performance, which showed to be the same.
Nevertheless, with the MoveNext in there at all, you absolutely cannot use that as evidence to show that a BE database will load all records. As ANY database would under those circumstances.
May 27 '07 #16
dima69
181 Expert 100+
Nevertheless, with the MoveNext in there at all, you absolutely cannot use that as evidence to show that a BE database will load all records. As ANY database would under those circumstances.
I guess I'me not explaining myself well. I agree that MoveLast loads all records in any case - that's why I use it to measure the time it takes. I other test case (which has nothing to do with MoveLast) I run a query which returns one record. This query just takes the same time as MoveLast case. That's why I conclude here that the query loads all records as well.
May 27 '07 #17
MMcCarthy
14,534 Expert Mod 8TB
I don't think the issue here is one of backend/frontend databases exactly. The issue is rather one of Recordsets and how the Jet Engine handles them.

There are five recordset types in DAO.

Table
Dynaset
Snapshot
ForwardOnly
Dynamic - odbc only, doesn't use the Jet Engine

Table type (dbOpenTable)
This has the advantage that you can use the table indexes. You cannot use indexes against other recordset objects.

Dynaset type (dbOpenDynaset)
When dynaset is created Access copies the key fields only to the recordset. These are the fields that uniquely identify the recordset. Then whenever you want to view/access a particular record Access fetches the latest version of that record. The advantage is that large recordsets will load faster but processing can be slow as Access has to refer to source each time it wants a record.

Snapshot (dbOpenSnapshot)
Access retrieves a copy of all records for all fields to the recordset. The advantage of this is that the full recordset is held in memory so that any procedures will process faster as Access doesn't have to reference the source.

ForwardOnly (dbForwardOnly)
Similar to snapshot except its read only and can only move in one direction which is forward.

Defaults

If no recordset type is defined then the following defaults are used by Access.

If the recordset is a table in the current database then Access defaults to Table type recordset.

If recordset is a query, sql statement or a non-access table then access defaults to Dynaset type recordset.

All other recordsets default to snapshot.

I'm not sure how access treats linked Access tables in this but specifying dynaset or snapshot is probably a good idea depending on requirements.

NOTES:

For Dynaset and Snapshot Access doesn't fully populate the recordset until navigation to the end of the table or query. Hence, dima69 using MoveLast.

Using saved queries will give slightly better preformance as the query is already compiled.
May 27 '07 #18
NeoPa
32,556 Expert Mod 16PB
I guess I'me not explaining myself well. I agree that MoveLast loads all records in any case - that's why I use it to measure the time it takes. I other test case (which has nothing to do with MoveLast) I run a query which returns one record. This query just takes the same time as MoveLast case. That's why I conclude here that the query loads all records as well.
I was misreading you I must admit. To be fair, that was more my misunderstanding than your explanation. Having checked back though, your test is still invalid.
From your earlier post :
1. Opening Snapshot-type recordset (as if copying all data to local computer) is the same time as running a query, with a criteria on non-indexed field.
I guess this test proves my previous point that the whole table must be brought from BE to run a query :)
Would this not also be a special case?
A query which processes via a non-indexed field is also going to load the whole table. The whole point (well main point at least) of the Jet Engine is to process through the tables using indeces where possible. The only valid tests would be your later tests, which use an index. These clearly show (from your stated results), that a faster response is given than could be expected if the Jet Engine were not used.
May 27 '07 #19
MMcCarthy
14,534 Expert Mod 8TB
This is taken directly from Wrox's "Beginning Access 2002 VBA".

Chapter 10 - Optimising your Application
subheading: Search on Indexed Fields in Attached Tables p.831/832

SELECT *
FROM tblPerformance
WHERE ID=4000

If the ID field in tblPerformance is indexed then the Jet engine knows that it will only need to retrieve pages containing records with an ID of 4000 from the tblPerformance table.

However, if the ID field is not indexed, then Jet will have to read the whole of the tblPerformance table from the disk and transfer it into memory of the PC running the query. If the tblPerformance table is on a network server, this means that the whole table will need to be transferred accross the network. Once it is in local memory, Jet can determine which records match the criterion by going though each record in turn and checking whether the ID field is equal to 4000. This is known as a full table scan and is slow.
May 27 '07 #20
Killer42
8,435 Expert 8TB
Subscribing.

(This might be one for the wishlist - my subscription is still to the old thread.)
May 28 '07 #21
MMcCarthy
14,534 Expert Mod 8TB
Subscribing.

(This might be one for the wishlist - my subscription is still to the old thread.)
Subscribing without replying will be introduced soon.
May 28 '07 #22

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

Similar topics

72
by: Mel | last post by:
Are we going backwards ? (please excuse my spelling...) In my opinion an absolute YES ! Take a look at what we are doing ! we create TAGS, things like <H1> etc. and although there are tools...
1
by: Smriti Dev | last post by:
Hi, I have a question regarding autonumbering . I'm using linked tables between msql and MS Access. Quite a few linked tables exist with relationships. The auto increment fields once linked...
1
by: Mike_red | last post by:
Hello, I hope someone can solve my problem here. I am currently working/programming a website using Debian Linux + Perl + PHP + PostgreSQL + Apache. Some data in the postgreSQL server must...
2
by: cisco | last post by:
Could anyone point me in the direction of a document that describes the difference between JET and Access? I can't seem to find anything. Another question i have is i have this application (.net)...
11
by: Rosco | last post by:
Does anyone have a good URL or info whre Oracle and Access are compared to one another in performance, security, cost etc. Before you jump on me I know Oracle is a Cadillac compared to Access the...
1
by: SKG | last post by:
Hi all We currently use a split A2k database system with about 10,000 clients / 45,000 orders / 90,000 order entries etc with about 17 users (only 8 users do editing) We currently upload data...
0
by: TheCoder | last post by:
I am making a D-base with web conectivity for my class project. I have everything working but the subit button sends the data to the correct fields but afterwards it wants to reproduce new blank...
3
by: MW de Jager | last post by:
I'm having endless problems with gaining access to an Access Database that sits on a different server. My ASP.NET app cannot gain control. The errror message I get is: The Microsoft Jet...
12
by: Selva Chinnasamy | last post by:
Hi I am using batch commands against Ms-Access and getting an error Message "Characters found after end of SQL statement." String Here is my sql Dim str_screens As String = "Select * from Screens...
6
by: LurfysMa | last post by:
I am working on an electronic flashcard application. I have one version up and running using Visual Basic (6.0) and Access 2000. My long-range plans are to put it up on a website and sell...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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...

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.