473,513 Members | 2,688 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ADP report slow with large record count

SQL2000 - AccessXP
I built an adp file with a stored procedure from SQL as follows:
SELECT * FROM
Z_mis_sjk_job_code_access
WHERE job_code=@JobCode
UNION ALL
SELECT * FROM
Z_mis_sjk_job_code_access_mkey
WHERE job_code=@JobCode
ORDER BY app_only, submenu_number, menu_routine_number,
menu_routine_text, initials

This sp runs fast with no problems. If I choose a job code that has a
small recordset return the report in access will run, a little slow,
but will run. If I choose a job code that returns a large recordset
(18,000), Access will show "not responding" in task manager and
ultimately the machine runs low on virtual memory and doesn't preview
the report. When I run the sp in the query window for the large job
code it runs in 4 seconds.

I tried to add the ORDER BY clause recently to see if that would help
the reports performance and it didn't help. I know I am suppose to
try and do all the processing on the SQL server but I must be missing
something.

The report in AccessXP Project (adp) has some grouping levels and
counting of records within those groups. I took out the page counter
at the bottom. It seems as though my access report is inefficient. I
even rebuilt the reports and it hasn't helped. Any other advice on
what I can do to get the report to run faster or at all in my project?

All help is greatly appreciated.
Sherry
sk*******@sfmc-gi.org
Nov 12 '05 #1
4 5343
My guess is that, with a stored procedure, Access is having to sort and group
from the returned recordset. Try building the SQL Statement on the fly (in
the Form_Open handler), and assign the RecordSource to the SQL statement, and
see if that makes a difference.

It could also be, though, that sorting and grouping the union (which cannot
take advantage of any indexes) is what's so slow.

On 1 Dec 2003 08:24:22 -0800, sk*******@sfmc-gi.org (sherkozmo) wrote:
SQL2000 - AccessXP
I built an adp file with a stored procedure from SQL as follows:
SELECT * FROM
Z_mis_sjk_job_code_access
WHERE job_code=@JobCode
UNION ALL
SELECT * FROM
Z_mis_sjk_job_code_access_mkey
WHERE job_code=@JobCode
ORDER BY app_only, submenu_number, menu_routine_number,
menu_routine_text, initials

This sp runs fast with no problems. If I choose a job code that has a
small recordset return the report in access will run, a little slow,
but will run. If I choose a job code that returns a large recordset
(18,000), Access will show "not responding" in task manager and
ultimately the machine runs low on virtual memory and doesn't preview
the report. When I run the sp in the query window for the large job
code it runs in 4 seconds.

I tried to add the ORDER BY clause recently to see if that would help
the reports performance and it didn't help. I know I am suppose to
try and do all the processing on the SQL server but I must be missing
something.

The report in AccessXP Project (adp) has some grouping levels and
counting of records within those groups. I took out the page counter
at the bottom. It seems as though my access report is inefficient. I
even rebuilt the reports and it hasn't helped. Any other advice on
what I can do to get the report to run faster or at all in my project?

All help is greatly appreciated.
Sherry
sk*******@sfmc-gi.org


Nov 12 '05 #2
On 1 Dec 2003 08:24:22 -0800, sk*******@sfmc-gi.org (sherkozmo) wrote:

The 4-second situation is not comparable: it just means that the query
starts outputting rows after 4 seconds, not that it is completed in 4
seconds.
To debug this, I would start with Query Analyzer (in the SQL Server
tools). Check the time it takes to complete the entire query.
Then create a very simple report, just dumping the data to the report
without any formatting or grouping or page numbers. That time should
be in the same ballpark as the QA time.
Then add formatting, grouping etc. The addl time is the overhead of
the report engine. Not much you can do about that, unless a more
powerful query would return the data pre-grouped.

18,000 rows, at 40 rows per page, is 450 pages. Who is going to read
all of that?

-Tom.
SQL2000 - AccessXP
I built an adp file with a stored procedure from SQL as follows:
SELECT * FROM
Z_mis_sjk_job_code_access
WHERE job_code=@JobCode
UNION ALL
SELECT * FROM
Z_mis_sjk_job_code_access_mkey
WHERE job_code=@JobCode
ORDER BY app_only, submenu_number, menu_routine_number,
menu_routine_text, initials

This sp runs fast with no problems. If I choose a job code that has a
small recordset return the report in access will run, a little slow,
but will run. If I choose a job code that returns a large recordset
(18,000), Access will show "not responding" in task manager and
ultimately the machine runs low on virtual memory and doesn't preview
the report. When I run the sp in the query window for the large job
code it runs in 4 seconds.

I tried to add the ORDER BY clause recently to see if that would help
the reports performance and it didn't help. I know I am suppose to
try and do all the processing on the SQL server but I must be missing
something.

The report in AccessXP Project (adp) has some grouping levels and
counting of records within those groups. I took out the page counter
at the bottom. It seems as though my access report is inefficient. I
even rebuilt the reports and it hasn't helped. Any other advice on
what I can do to get the report to run faster or at all in my project?

All help is greatly appreciated.
Sherry
sk*******@sfmc-gi.org


Nov 12 '05 #3
Steve - I removed the union and tried the same report on the first
select and the same scenerio - the report is still slow. Can you give
me a little more direction on the idea behind building the SQL
statement on the fly.
Thanks again.
Sherry

Steve Jorgensen <no****@nospam.nospam> wrote in message news:<k8********************************@4ax.com>. ..
My guess is that, with a stored procedure, Access is having to sort and group
from the returned recordset. Try building the SQL Statement on the fly (in
the Form_Open handler), and assign the RecordSource to the SQL statement, and
see if that makes a difference.

It could also be, though, that sorting and grouping the union (which cannot
take advantage of any indexes) is what's so slow.

On 1 Dec 2003 08:24:22 -0800, sk*******@sfmc-gi.org (sherkozmo) wrote:
SQL2000 - AccessXP
I built an adp file with a stored procedure from SQL as follows:
SELECT * FROM
Z_mis_sjk_job_code_access
WHERE job_code=@JobCode
UNION ALL
SELECT * FROM
Z_mis_sjk_job_code_access_mkey
WHERE job_code=@JobCode
ORDER BY app_only, submenu_number, menu_routine_number,
menu_routine_text, initials

This sp runs fast with no problems. If I choose a job code that has a
small recordset return the report in access will run, a little slow,
but will run. If I choose a job code that returns a large recordset
(18,000), Access will show "not responding" in task manager and
ultimately the machine runs low on virtual memory and doesn't preview
the report. When I run the sp in the query window for the large job
code it runs in 4 seconds.

I tried to add the ORDER BY clause recently to see if that would help
the reports performance and it didn't help. I know I am suppose to
try and do all the processing on the SQL server but I must be missing
something.

The report in AccessXP Project (adp) has some grouping levels and
counting of records within those groups. I took out the page counter
at the bottom. It seems as though my access report is inefficient. I
even rebuilt the reports and it hasn't helped. Any other advice on
what I can do to get the report to run faster or at all in my project?

All help is greatly appreciated.
Sherry
sk*******@sfmc-gi.org

Nov 12 '05 #4
Well, sure, but read Tom's answer too because that also makes sense. It could
simply be that in one case, SQL Server is able to return the first rows
quickly, while in the other case, it must process all reows before returning
anything. Are you really intending to report 18,000 rows?

Anyway, for building the SQL on the fly, all you really have to do is assemble
the same SQL you posted in your message, but append the actual job code
expressions into the strings where the parameters are now. Presuming job code
is a number, and assuming you are using Access 2002, you can pass the job code
to the report through the OpenArgs argument (in 2000 and ealier, there is no
OpenArgs when opening reports), and insert it into the string like this...

Me.Recordsource = _
"SELECT * FROM Z_mis_sjk_job_code_access " & _
"WHERE job_code=" & Me.OpenArgs " & _
"UNION ALL SELECT * FROM Z_mis_sjk_job_code_access_mkey" & _
....

On 2 Dec 2003 06:20:19 -0800, sk*******@sfmc-gi.org (sherkozmo) wrote:
Steve - I removed the union and tried the same report on the first
select and the same scenerio - the report is still slow. Can you give
me a little more direction on the idea behind building the SQL
statement on the fly.
Thanks again.
Sherry

Steve Jorgensen <no****@nospam.nospam> wrote in message news:<k8********************************@4ax.com>. ..
My guess is that, with a stored procedure, Access is having to sort and group
from the returned recordset. Try building the SQL Statement on the fly (in
the Form_Open handler), and assign the RecordSource to the SQL statement, and
see if that makes a difference.

It could also be, though, that sorting and grouping the union (which cannot
take advantage of any indexes) is what's so slow.

On 1 Dec 2003 08:24:22 -0800, sk*******@sfmc-gi.org (sherkozmo) wrote:
>SQL2000 - AccessXP
>I built an adp file with a stored procedure from SQL as follows:
>SELECT * FROM
>Z_mis_sjk_job_code_access
>WHERE job_code=@JobCode
>UNION ALL
>SELECT * FROM
>Z_mis_sjk_job_code_access_mkey
>WHERE job_code=@JobCode
>ORDER BY app_only, submenu_number, menu_routine_number,
>menu_routine_text, initials
>
>This sp runs fast with no problems. If I choose a job code that has a
>small recordset return the report in access will run, a little slow,
>but will run. If I choose a job code that returns a large recordset
>(18,000), Access will show "not responding" in task manager and
>ultimately the machine runs low on virtual memory and doesn't preview
>the report. When I run the sp in the query window for the large job
>code it runs in 4 seconds.
>
>I tried to add the ORDER BY clause recently to see if that would help
>the reports performance and it didn't help. I know I am suppose to
>try and do all the processing on the SQL server but I must be missing
>something.
>
>The report in AccessXP Project (adp) has some grouping levels and
>counting of records within those groups. I took out the page counter
>at the bottom. It seems as though my access report is inefficient. I
>even rebuilt the reports and it hasn't helped. Any other advice on
>what I can do to get the report to run faster or at all in my project?
>
>All help is greatly appreciated.
>Sherry
>sk*******@sfmc-gi.org


Nov 12 '05 #5

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

Similar topics

5
3127
by: Shay | last post by:
essentially I am trying to do some counts based on some assumptions in the recordset. So I get the RS back, put the values into a variable, move to the next record in the RS and compare what is in the variable to the value in the next record in the recordset and do a count. Then overwrite the value in the variables and do the same for the...
12
2613
by: Neil | last post by:
I previously posted re. this, but thought I'd try again with a summary of facts. I have an Access 2000 MDB with a SQL Server 7 back end. There is a view that is linked to the database via ODBC and has been in place for several years without any performance problems. Recently I added a couple of fields to the output of the view, and it...
8
2868
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 it took to go to a record was very slow. The go to mechanism was a box that the user typed the index value into a combo box, with very simple code...
6
2016
by: Richard Holliingsworth | last post by:
Hello: Thanks for reading this. I would like to build a report (Access 2002) that uses SQL queries to count records in specific groups. I've tried several methods and so far no luck. Could someone please point me in the right direction on this one. It
1
2708
by: Justin Koivisto | last post by:
I am trying to create a report that displays a name of an advertising source and count of the number of times it was hit between certain date ranges. The data is split between two different databases: this access db, and a remote MySQL server. The MySQL tables are linked in the access db. What I have done so far is created an On Open event...
2
7794
by: SJM | last post by:
I have a report that displays records of real estate properties. It is possible for each property to appear a number of times for various reasons. Each record however is unique. What I would like to do is display the total of the number of unique properties in the report footer, not just a count of the number of records. I have experimented...
6
3307
by: Mike Conklin | last post by:
This one really has me going. Probably something silly. I'm using dcount for a report to determine the number of different types of tests proctored in a semester. My report is based on a parameter query which is the recordsource for the report. The parameter is <=. The query returns the correct amounts upto the date entered (no need for...
5
4871
by: Clownfish | last post by:
I have a report that joins 12 external tables, and works great. However, there is a time when I wish to skip printing a particular record. Background: The 12 tables all have the same fields, and are "unioned". One field is and one is . The report GROUPS the list by Office. The logic I wanted to do in the report detail is:
9
2163
by: magickarle | last post by:
Hi, I have a database in access with the following columns: Day AgentID ManagerID Grade They got information about agents and some grades. I would like to have ONE form with several grouping (yearly quarterly and weekly) with the respective average.
0
7270
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...
0
7178
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7397
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. ...
0
7563
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...
0
5703
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...
1
5102
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
4757
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3239
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1612
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

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.