473,783 Members | 2,269 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Generating overnight data vs Live - suggestions needed.

We have an MIS system which has approx 100 reports. Each of these
reports can take up to several minutes to run due to the complexity of
the queries (hundreds of lines each in most cases). Each report can be
run by many users, so in effect we have a slow system.

I want to seperate the complex part of the queries into a process that
is generated each night. Then the reports will only have to query
pre-formatted data with minimal parameters as the hard part will have
been completed for the users when they are not in. Ideally we will
generate (stored procedure possibly) a set of data for each report and
hold this on the server. We can then query with simpler parameters
such as by date and get the data back quite quickly.

The whole process of how we obtain the data is very complex. There are
various views which gather data from the back office system. These are
very complex and when queries are run against them including other
tables to bring in more data, it gets nicely complicated.

The only problem is that the users want to have access to LIVE data
from the back office system, specifically the Sales team who want to
access this remotely. My method only allows for data from the night
before, so is there an option available to me which will allow me to
do this ? The queries can't be improved on an awful lot, so they will
take as long as they take. The idea of running them once is the only
way I can see to improve the performance in any significant way.

True I could just let them carry on as they are and let them suffer
with the performance on live data, but I'd like to do something to
improve the situation for them.

Any advice would be appreciated.

Thanks

Ryan
Jul 20 '05 #1
2 1968
Yep, that definitely makes a difference. Taken me a while to get back
to this, but we're looking at a solution along these lines.

By taking a copy of the data from the view into a table and then
replicating this onto another database (for generating) and then
running stored procedures (from each complex query) against this,
we've been able to reduce the time from 5 minutes for a test generate
query to about 3 seconds. We've timed the other parts and can probably
generate all of our data in less than 5 minutes for 100 complex
queries that would normally take hours.

Once this data is generated we'll simply swap it for the current data
which should be pretty quick. Our report now loads in less than a
second as opposed to 5 mins or so.

This means we can probably update the data once an hour and push it
onto the query database which will be more than quick enough for the
users. This has the knock on effect of being able to produce the
reports in seconds instead of minutes.

Erland, thanks for the advice on this it should make quite a
difference.

Erland Sommarskog <so****@algonet .se> wrote in message news:<Xn******* *************** @127.0.0.1>...
Ryan (ry********@hot mail.com) writes:
The only problem is that the users want to have access to LIVE data
from the back office system, specifically the Sales team who want to
access this remotely. My method only allows for data from the night
before, so is there an option available to me which will allow me to
do this ? The queries can't be improved on an awful lot, so they will
take as long as they take. The idea of running them once is the only
way I can see to improve the performance in any significant way.


If users want current data, you cannot pre-compute it for them. You
know, have the cake and eat it.

What you could to do is to set up a report server which you replicate
to, so that you take the load of the back-office system.

Yet another alternative, is to have three databases:
A - the source-system.
B - the view system that the users use.-
C - a computation system.

You keep the computation database updated by means of log shipping
(this is better than replication in this case). One you have applied
a log, you pre-compute all data. When this step is done, you flush the
pre-computed tables on B, and insert the data from C. Now you go and
pick up a new log from A. A more fancy variant is to have a seamless
switch between B and C which you flip constantly. I believe there are
such things.

Jul 20 '05 #2
Ryan (ry********@hot mail.com) writes:
By taking a copy of the data from the view into a table and then
replicating this onto another database (for generating) and then
running stored procedures (from each complex query) against this,
we've been able to reduce the time from 5 minutes for a test generate
query to about 3 seconds. We've timed the other parts and can probably
generate all of our data in less than 5 minutes for 100 complex
queries that would normally take hours.
300 seconds down to three! That's not bad!
Erland, thanks for the advice on this it should make quite a
difference.


I'm only glad to have helped! And thanks for reporing back!
--
Erland Sommarskog, SQL Server MVP, so****@algonet. se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techinf...2000/books.asp
Jul 20 '05 #3

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

Similar topics

15
3379
by: Christian Tismer | last post by:
Dear friends. During a conversation with good friends and newly acquired Pythonista, we were discussing Python, what it is in essence, and what it is giving to us. The people were Dinu Gherman, Giorgio Giacomazzi, a promizing newcomer in the Python noosphere, and myself. We were discussing how to advertize for Python, and Dinu
7
4832
by: Chris Ritchey | last post by:
Hmmm I might scare people away from this one just by the title, or draw people in with a chalange :) I'm writting this program in c++, however I'm using char* instead of the string class, I am ordered by my instructor and she does have her reasons so I have to use char*. So there is alot of c in the code as well Anyways, I have a linked list of linked lists of a class we defined, I need to make all this into a char*, I know that I...
12
6564
by: Russ | last post by:
I'm interested in setting up a web page where live data can be displayed in real-time on the web page. For example: I would like to display a (nice looking) graph of some data value versus time and have the graph update every second without the user having to do anything like hit a refresh button. The data to plot is readily available from an application running on the server - I can expose it in whatever way is needed (currently easily...
0
2396
by: Chankama | last post by:
Hi. I am making an application using the Compact Framework for a PPC. Essentially what I am trying to do is, read a table from a external datasource, and try to display it using the datagrid. For my purposes, I can't use DataTable and DataSet, etc. etc. ie. So I am implementing iTypedList. To put it simply, I need to override the 'Count' property such that the datagrid will know the exact number of elements in my external datasource, but...
4
1171
by: jhill | last post by:
is it possible to display 'live' data in .net via a web page? by live data i mean data that is changing dynamically, say once a second i am guessing i need to use java to go this route because MS has no support for it. however, if it is possible to do with .net, i'd be very interested my thought is to have some kind of socket connection to the server where data is refreshed at a high rate of at least 1 time a second, possibly more (we've...
5
1814
by: Andy Baker | last post by:
Our VB.NET 2003 application requires several processes to run overnight. I have written a program to perform these processes with a simple user interface to allow the user to switch various options on/off, and using the code from VB.NET programmer's cookbook (NotifyIcon) have it running in the system tray. When windows xp is started, the overnight routines program starts, and the icon appears in the system tray. I then use a timer to...
2
2578
by: Dale | last post by:
Access 2003 I have an access database used for scoring a high school sporting event. Data is entered as scores are turned in from the different events throughout the day. I would like to display data via multi-media projector in real time, so students & teams know thier status at all times. I am open to ideas about how to achieve this. I have tried reports
1
1018
by: Bobby Edward | last post by:
I am doing a funeral home page (depressing huh?) :) They want an obituary page where people can post comments. So, in my db I have 2 tables (1 to many relationship)... TABLE1: Obituary (persons info) TABLE2: ObitComments ("many" table - comments) There would be an admin page to approve or reject comments, manage obituaries, etc...
0
1861
by: Aswanth | last post by:
I'm Generating Reports in SSRS-2005.. Previously I got the Data from One Database & Generated Reports.. Now I used to get the Data from Two Different Databases(ie Database-1 & Database-2) & to generate the Reports.. I'm having one Stored Procedure(Get_Data) which will combine Two databases & get the data from them.. It is working fine for Me..(I tested in Sql Server Management Studio).. But it is Not working fine in my Visual Studio.. ...
0
9643
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10313
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10081
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6735
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
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
2
3643
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2875
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.