Union Queries

This is a discussion on "Union Queries" within the Databases section. This forum, and the thread "Union Queries are both part of the Program Your Website category.



Go Back   Webforumz.com > Main Forums > Program Your Website > Databases

Notices


Closed Thread
 
LinkBack Thread Tools
  #1 (permalink)  
Old Oct 21st, 2003, 14:14
Junior Member
Join Date: Aug 2003
Location: USA
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Union Queries

This question is one that I'm not quite sure of what and how to ask, so please indulge me. I'm sure its almost impossible to answer, but any thoughts would be appreciated.

I've got a database using Access 2000 which is somewhat complicated.

I need to return or report data as such:

Code Activity Total
001 Name 5
002 Name 2
003 Name 4
004 Name 6
thru
152 Name 15

The codes are broken down into 5 different categories and a number of tables. A report in numerical order is required.

For each category, there are approx 5 tables linked to one table. I am returning a count/sum/total of records from each of these tables using a parameter query which also contains 3 where clauses. The parameters in each query is referenced to [Forms]![ReportDialog]![Field].

Using a Union Query, the parameter queries in a category is then combined into one.

A second union query is then used to combined the 5 category union queries in one.

On the surface, all of this seems to work. My question centers around performance and load. Can you potentialy see a problem with this senario down the road. What I don't want to happen is this work fine for 6 or 8 months, and then all of a sudden, performance suffers or it cease to operate. The main linked table in each category will have maybe 8000 records each per year, with the linked tables to each main table containing that number or less.

Again, I know the question leaves a lot of what ifs, but any thoughts would be appreciated.

Thanks

Ernest L. Kendricks

  #2 (permalink)  
Old Oct 21st, 2003, 18:25
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
Performance and load has a lot to do with how often this report is being run. Do you have an estimate on that?

Complex queries like that tend to be a bit slow in Access in general though. If you're using a programming language to access this report you might consider combining your data at that level rather than having the db union it together.
  #3 (permalink)  
Old Oct 21st, 2003, 18:36
Junior Member
Join Date: Aug 2003
Location: USA
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks for the reply based on such a vague question:

I'm calling the report from Access. The report will be run each day, filtered by say 12 employees. Therefore it will be run 12 to 13 times per day, then weekly, then monthly.

I'm not awfully concerned about absolute speed (a couple seconds here and there), but rather serious operating problems/crashes down the road when the database is pouplated with thousands of records.

Thanks again for trying to give a reasonable answer to such an open ended question.

Ernest
  #4 (permalink)  
Old Oct 21st, 2003, 21:41
Most Reputable Member
Join Date: Jul 2003
Posts: 1,856
Thanks: 0
Thanked 0 Times in 0 Posts
From what I remember when I looked into different database performace levels Access seems to cap out at around 100,000 records per table.

I don't think you'll run into problems for a while with it, though you should periodically compact the db to keep the file size down and performance up. And of course back it up from time to time.

Access is very easy to scale up from so if you outgrow it you can move your data to FoxPro or SQL Server without much trouble.
  #5 (permalink)  
Old Oct 21st, 2003, 23:01
Junior Member
Join Date: Aug 2003
Location: USA
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks for the info... I think it will be years before the tables reach a 100,000 max.

Ernest L. Kendricks
Closed Thread

Tags
union, queries

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL queries alexgeek Databases 2 Sep 27th, 2007 08:41
Union Graphite mikka23 Free Web Site Critique 2 Jul 21st, 2007 12:40
Access: linking queries djme Databases 0 Oct 7th, 2006 19:24
Dreamweaver ASP/Vb - Queries grahamben98 Classic ASP 3 Jul 2nd, 2006 20:52
Fat Truckers Union Game! Smokie Flash & Multimedia Forum 11 Sep 22nd, 2004 08:54


All times are GMT. The time now is 19:57.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43