473,396 Members | 1,707 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.

Slow record navigation

I'm having a problem trying to optimize the performance of one of my
A97 databases. I have very slow record navigation after a change I made
to the table structure, and I'm not sure how best to correct it.

For purposes of explanation, lets say I have two tables: tblIssues and
tblLocationHistory. The tblIssues table contains 'incidents' along with
the incident header information. The tblLocationHistory table contains
a list of all locations that incident has been to along with time
stamps and owner information.

tblIssues
PK: IssueID (autonumber)
~Many misc fields

tblLocationHistory
PK: HistID (autonumber)
FK: IssueID
OwnerID
Location
DateBegin
DateEnd

I have a primary form, which contains information from tblIssues that
contains a button to pull up another form, which then shows that issues
location history. This works just fine.

The problem is that I need to show the original location (first record
for that issue in tblLocationHistory) as well as the last location
(last record for that issue in tblLocationHistory) on the Primary form
for a 'dashboard' view.

Originally I tackled this problem by adding de-normalized fields in
tblIssues that contained the original and current location. At the time
I figured the performance gain and simplified query structure would
outweigh the problem of trying to keep the current and original
location information in tblIssues correctly synchronized with the data
in tblLocationHistory. Turned out I was wrong. Despite my best efforts,
there were still occurrences where the two were not synchronized, and
it created major workflow and reporting problems when it did occur. So,
I decided I would try and do it properly and represent those fields
with queries rather than duplicate data fields.

First, I built a query (qryOrigin1) based on tblLocations that
performed a Totals function to GroupBy IssueID and display the Min of
HistID for original location. (I did same thing but Max of HistID for
Current Location) I then created another query (qryOrigin2) which
utilized the results of qryOrigin1 to display the rest of the fields in
tblLocationHistory. The queries qryOrigin2 and qryCurrent2 were then
linked to tblIssues in another table and used as the datasource for the
primary form. It works great (really fast) except for one big problem:
the fields on the form were no longer updateable because of the sum
functions performed in qryOrigin1 and qryCurrent1.

I started over and tried something else. I returned the datasource of
the primary form to tblIssues and used dLookup functions to access the
information in qryOrigin2 and qryCurrent2. The fields on the primary
form were now updateable, but now those fields with the dLookup
functions were taking north of four seconds to display after a user
navigated to a new record. This was an annoyance for users, so I tried
a new method.

This time I created two separate sub forms on the Primary form that
contained the Current and Original location moves. This solved the
problem of the information taking 4 seconds to display, but also
introduced a new problem. Record scrolling now takes over 1 sec going
from one record to the next.

I had assumed A97 set up the sub forms to automatically requery the
entire dataset displayed in the subforms with each record move, so I
tried removing the linkchild fields and applying a filter instead on
the OnCurrent event. While this worked, there were no observed
performance gains.

At this point the only thing I could see doing to increase the
performance would be to transfer everything over to a manually coded
recordset. That sounds like a PITA, and I'd like to avoid it if
possible.

Right now, this slow performance is not much more than an annoyance for
users. However, the database is set to grow in size significantly and
I'm worried that these annoyances will turn into more serious
performance issues. It seems to me that if it's possible to make a
single query that can display everything I want it to and has great
performance (but is read only), I should be able to recreate something
that is editable and has similar performance. Since I'm almost entirely
self taught, I'm wondering if there isn't a more practical way to go
about doing this that I don't know about.

Thanks in advance for any advice any of you might add

Aug 7 '06 #1
0 1731

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

Similar topics

8
by: Neil | last post by:
I have a very puzzling situation with a database. It's an Access 2000 mdb with a SQL 7 back end, with forms bound using ODBC linked tables. At our remote location (accessed via a T1 line) the time...
0
by: Carl | last post by:
I have a main form with navigation buttons on it and a label showing for example Record 1 of 15 using recordsetclone on it and eveything works fine. When I move through the records the record...
15
by: Steve | last post by:
I have a form with about 25 fields. In the BeforeUpdate event of the form, I have code that sets the default value of each field to its current value. For a new record, I can put the focus in any...
0
by: misscrf | last post by:
I am currently working on a database, in 3rd normal form, which is for candidates who apply for a job with the law firm that I workd for. My issue is with good form design. I have a main...
8
by: Zlatko Matić | last post by:
There is a form (single form) and a combobox. I want that current record of the form is adjusted according to selected value in the combobox. Cuurrent record should be the same as the value in the...
1
by: Simon | last post by:
Dear reader, With a combobox I can go to a selected record picked in the pull down list. And in the same time the record navigation field shows the selected record number from the...
6
by: John | last post by:
Hi I need to block user from moving away from a record using any of First/Last/Prev/Next/New Record or any other way IF the record has not been saved, and displaying a message to the effect...
4
by: Jamey Shuemaker | last post by:
Howdy, Saw a couple threads from the past few years on this topic, but didn't really find any solutions. Here's one I found:...
0
by: emalcolm_FLA | last post by:
Hello and TIA for your consideration. I have created several db's for a non-profit and they want custom navigation buttons to display "You are on the first record, last record, etc". With this...
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
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...
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
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.