473,666 Members | 2,302 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Response time for a View.

4 New Member
Hi,
I faced some difficulty for select statement in a view?
My problem is when I query this view, it consumes more than 4 mins in order to come out the data.
My question is how to optima this VIEW select statement response time?

FYI. This view (in MS SQL 2005 Server) is created from a few table's information.
Oct 2 '07 #1
4 1818
ck9663
2,878 Recognized Expert Specialist
Hi,
I faced some difficulty for select statement in a view?
My problem is when I query this view, it consumes more than 4 mins in order to come out the data.
My question is how to optima this VIEW select statement response time?

FYI. This view (in MS SQL 2005 Server) is created from a few table's information.
lots of factors, among them?
1. does the table being referred by the view have the necessary index?
2. is your query optimize? (sequence of ORs and ANDs)
3. how big is your data?
Oct 2 '07 #2
ailinseng
4 New Member
lots of factors, among them?
1. does the table being referred by the view have the necessary index?
2. is your query optimize? (sequence of ORs and ANDs)
3. how big is your data?
Ans 1: I don't know how to check whether that relevant table have necessary index or not. Could you tell me how to check it?

Ans2: My view is created by a few difference table and using UNION. So, when I query my data I just do very simple statement, for instance "SELECT * FROM VIEW" only.

Ans3: I think total records in that particular view that I created is almost 900,000 records.....

Do you have any idea in how to make this query by using view become more better performance?

I am appreciate if you can help me in this area. TQ.
Oct 4 '07 #3
ck9663
2,878 Recognized Expert Specialist
Ans 1: I don't know how to check whether that relevant table have necessary index or not. Could you tell me how to check it?

Ans2: My view is created by a few difference table and using UNION. So, when I query my data I just do very simple statement, for instance "SELECT * FROM VIEW" only.

Ans3: I think total records in that particular view that I created is almost 900,000 records.....

Do you have any idea in how to make this query by using view become more better performance?

I am appreciate if you can help me in this area. TQ.
1. sp_help mytable - one of the result will be info on your index on the table.try creating an index on fields used in JOINs and WHEREs.

2. depends on your query. the query am talking about is not the query used to access the view, but to create it. a view is basically a saved query. if it's ok with you, you can paste it here.

3. that may be considered as large data. so it will really take some time. also depending on the machine you're using...
Oct 4 '07 #4
ailinseng
4 New Member
1. sp_help mytable - one of the result will be info on your index on the table.try creating an index on fields used in JOINs and WHEREs.

2. depends on your query. the query am talking about is not the query used to access the view, but to create it. a view is basically a saved query. if it's ok with you, you can paste it here.

3. that may be considered as large data. so it will really take some time. also depending on the machine you're using...
My View is created as statement below (which naming as abc_view):

select tc_title, tc_from, tc_to, tc_begin, tc_end, locname,tt_name ,
name, designation, branch,ti_atten dance,
case when ti_result5>0 then ti_result5
when ti_result4>0 then ti_result4
when ti_result3>0 then ti_result3
when ti_result2>0 then ti_result2
else ti_result1
end as result
from trn_traineeinst ance r, trn_trainerinst ance i, trn_trainer t,
staff_history e, staffnamelistvi ew v,trn_course c, trn_location
where tti_tcode=tt_co de
and tc_code=tti_cco de
and ti_ccode=tti_cc ode
and ti_empkey=e.emp key
and e.empkey=v.empk ey
and tc_location=loc code


Then, I just use the statement below toretieve my data, but it took me almost 4mins to complete the retrieving process:

select * from abc_view
Oct 4 '07 #5

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

Similar topics

7
6999
by: Jon Spivey | last post by:
Experimenting with response.flush() but can't seem to get it to work. This code <% response.write "<p>started</p>" response.flush() for i = 1 to 10000000 i = i +1 next response.write "<p>ended</p>" %>
14
595
by: Hugh Welford | last post by:
Hi - trying to display a memo field using response.write but it truncates it. Is there a size issue with response.write? If so how do I get round it and to be able to display the whole memo field Thanks in advance Hugh
1
4461
by: Dan | last post by:
Hi I've created a generic 'Report' class that takes a DataView from a DataGrid control and writes it out to the response as a csv file for download. Basically, when a user clicks the download button on the page, this class is instantiated and the download method called. The odd thing is you get the Save/Open dialog popup twice!! Any ideas why? The code look like public void DownloadDataView(DataView view, Page page string fileName =...
2
4332
by: RAJ | last post by:
In our multi-tier application, we have several ASP.NET user controls which will update the same data source provided by middle tier logic. In this particular scenario we have one user control displaying the contents of the data source, whilst another control updates the datasource via a command buttons implementation of 'Click', an event raised in the 'Handle Postback Events' stage of the control execution life cycle (via the...
3
2027
by: Bidyadhar Patra | last post by:
Hai, Could any body help me out in finding out the Client Perceived Response Time for an ASP.Net application. CPRT is measuring the time it takes for a page to load from browser click to browser click. This takes into account network latency incurred by routing, firewalls and proxies.
6
7360
by: john | last post by:
The standard method to transmit a file from an aspx page to a browser is to stream the file to the response then end the response. The HTML code generated by the aspx page is discarded, and the browser displays or offers to save the binary file instead. I would like to have the browser accept and display the revised HTML code as well as offering to open or save the attached file. This SHOULD be possible using a multipart MIME format -...
1
4826
by: ret4rt | last post by:
Hello. I have a task to do which is as follows: I have to do an "id query" on a primary key of my db and then calculate the response time of the query. Task says that i'm able to take screenshots of a graphical view of response time.And as a hint says that there are sql commands that can do such thing.Allthough i've searched the books i have access to and the internet i can't find such thing.I dunno maybe someone more familiar with this stuff...
11
5071
by: ra294 | last post by:
I am building a page that needs to recieve some parametes and return blank page (empty response). After I recieve the parametes I write: Response.clear Response.End When I run the page I still get some html when doing "view source" in IE: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD>
1
2853
by: =?Utf-8?B?V29vZGdub21l?= | last post by:
Hi, I have use the following code to transmit a file back to the browser that worked fine on a HTC_TTyN device running windows mobile 5.0. The code executes in the onclick event of a mobilelist control. Now on a similar device running window mobile 6.0 the file is not displayed - the link causes a post back succesfully and the code appears to execute - on the browser a bar is displayed breifely at the bottom of the window (although ist...
0
8443
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
8866
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...
0
8781
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8550
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
7385
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 launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6192
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 instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5663
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();...
1
2769
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
2011
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.