Help With Query ,should I Belive Profiler ?

Mar 22, 2006

Hi ,
I have query executed 1000 times a day by application with diffrent values in where ... but profiler shows different duration each time
duration might be 100 milisecond ,but might be 140000 miliseconds !!!

what is a reason ? should I belive profiler ?

SELECT cust_calls.call_date , cust_calls.work_order_sap , cust_calls.call_type_code , cust_calls.call_status , cust_calls.ind_max_expense , cust_calls.chng_date , cust_calls.user_id , cust_calls.call_seq_no , cust_calls.loc_equip_seq_no , cust_calls.initial FROM cust_calls WHERE (
cust_calls.loc_equip_seq_no = 3780 ) --changes with each query
ORDER BY cust_calls.call_date DESC

execution plan

|--Index Seek(OBJECT ([price].[dbo].[cust_calls].[cust_calls2]), SEEK ([cust_calls].[loc_equip_seq_no]=Convert([@1])) ORDERED FORWARD)
--space used--
name rows reserved data index_size unused
cust_calls 205019 201544 KB 74776 KB 38256 KB 88512 KB

-- table structure
CREATE TABLE [cust_calls] (
[call_seq_no] [numeric](7, 0) NOT NULL ,
[manufacturer_code] [char] (6) COLLATE SQL_Latin1_General_CP1_CI_AI NULL ,
[in_charge_code] [char] (6) COLLATE SQL_Latin1_General_CP1_CI_AI NULL ,
[work_order_sap] [char] (7) COLLATE SQL_Latin1_General_CP1_CI_AI NULL ,
[loc_equip_seq_no] [numeric](7, 0) NOT NULL ,
[call_type_code] [char] (5) COLLATE SQL_Latin1_General_CP1_CI_AI NOT NULL ,
[syst_lang_code] [char] (3) COLLATE SQL_Latin1_General_CP1_CI_AI NULL ,
[maint_emp_code] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AI NULL ,
[expense_code] [char] (5) COLLATE SQL_Latin1_General_CP1_CI_AI NULL ,
[ind_max_expense] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AI NULL ,
[call_date] [datetime] NULL ,
[call_status] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AI NULL ,
[call_description] [text] COLLATE SQL_Latin1_General_CP1_CI_AI NULL ,
[chng_date] [datetime] NOT NULL ,
[user_id] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AI NOT NULL ,
[Invoice_number] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AI NULL ,
[invoice_date] [datetime] NULL ,
[invoice_amount] [numeric](9, 2) NULL ,
[invoice_note] [text] COLLATE SQL_Latin1_General_CP1_CI_AI NULL ,
[initial] [char] (4) COLLATE SQL_Latin1_General_CP1_CI_AI NULL ,
[call_date_update] [datetime] NULL ,
[call_logon_id_update] [char] (8) COLLATE SQL_Latin1_General_CP1_CI_AI NULL ,
[gl_code] [char] (6) COLLATE SQL_Latin1_General_CP1_CI_AI NULL ,
[ind_follow_up] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AI NULL ,
CONSTRAINT [PK__cust_calls__4EF38B7F] PRIMARY KEY CLUSTERED
(
[call_seq_no]
) WITH FILLFACTOR = 90 ON [PRIMARY] ,
CONSTRAINT [FK__cust_calls__call___601E1781] FOREIGN KEY
(
[call_type_code]
) REFERENCES [cust_call_type] (
[call_type_code]
),
CONSTRAINT [FK__cust_calls__expen__267B85D1] FOREIGN KEY
(
[expense_code]
) REFERENCES [cust_expense] (
[expense_code]
),
CONSTRAINT [FK__cust_calls__in_ch__73BAFBDA] FOREIGN KEY
(
[in_charge_code]
) REFERENCES [cust_in_charge_warranty] (
[in_charge_code]
),
CONSTRAINT [FK__cust_calls__maint__40FA71E3] FOREIGN KEY
(
[maint_emp_code]
) REFERENCES [cust_maintenance_employees] (
[maint_emp_code]
),
CONSTRAINT [FK__cust_calls__manuf__41EE961C] FOREIGN KEY
(
[manufacturer_code]
) REFERENCES [cust_manufacturer] (
[manufacturer_code]
),
CONSTRAINT [FK__cust_calls__syst___1B29CEB6] FOREIGN KEY
(
[syst_lang_code]
) REFERENCES [cust_system_lang] (
[syst_lang_code]
),
CONSTRAINT [FK_cust_calls_cust_GL_Code_Type] FOREIGN KEY
(
[gl_code]
) REFERENCES [cust_GL_Code_Type] (
[gl_code]
)
) ON [PRIMARY] TEXTIMAGE_ON [PRIMARY]
GO

View 10 Replies


ADVERTISEMENT

Need Details On Query Profiler

Jul 23, 2005

Where is the information coming from that is displayed in queryprofiler.Is it the command that is retrieved before it is processed, or is itwhat is actually processed.

View 3 Replies View Related

Query Profiler Event Log Software

Feb 16, 2004

I am looking for a way to log all events that occur on the server. I have used quary profier and that gets me the info i need but is there a way to truncate the file, say only log the last 30 minutes of activity and having it rolling so that it is always the last 30 minutes. Or is there some other software that will do this. The database times out at random times and I am trying to fix the problem but dont want to keep houndreds of log files that query profiler will create by leaving a trace running 24/7. Any suggestions.
Thanks
Mark

View 5 Replies View Related

Timing Difference Between Query Analyzer And Profiler

Aug 1, 2014

We are trying to troubleshoot some website performance issues and found some queries taking 2 to 3 seconds when the request comes from the web, and captured by the Profiler.

The same queries, when run in the Query Analyzer take 0 seconds.

What could be the reasons for this difference, I mean why it takes 2 - 3 seconds shown by the Profiler, when it's 0 second in Analyzer?

View 3 Replies View Related

T-SQL (SS2K8) :: Can Value Of Parameters Passed To A Query Be Determined In Profiler

Mar 27, 2014

In Profiler a StmtCompleted Event Class has identified a query to be:

SELECT TOP 1 * FROM [WINSVR2008R2].[001].DBO.[OECTLFIL_SQL] WHERE ( ( OE_CTL_KEY_1 = @P1 ) ) order by OE_CTL_KEY_1 asc

Is there any way to determine the value of @P1? If so which Event class and Column should I examine?

View 5 Replies View Related

SQL Server 2012 :: Query Execution Not Showing Up In Profiler Trace

Aug 22, 2014

Set up a trace with the events RPC:Completed, SQL:BatchCompleted, SQL:BatchStarting, and SQL:StmtCompleted.

When I issue the statement: SELECT * FROM XyzView there is nothing captured in Profiler. If I script out the view and then execute the select statement that defines the view, it does show up in Profiler.

I've tried adding a lot of the other events, i.e. SP:StmtCompleted and the various other StmtStarting events and the trace still does not capture anything.

Am I capturing the wrong events or is this known behavior? My goal is to see what the overhead is for using a view versus persisting the results of the view as a table and referencing that instead. The view in question is against static data, joins 9 tables, and is referenced a lot.

I can use the stats generated when I execute the select that defines the view but I still find this to be curious behavior so I assume I'm doing something wrong.

View 9 Replies View Related

SQL 2012 :: How To Find Query Which Have Sort Warning Alert In Profiler

Jan 30, 2015

which have a lot of impact to database performace since it do not fit onto memory and spill over to disks.

The question is when i ran a profiler and tried to catch a sort warning i cannot find the query which cause the alert.

View 1 Replies View Related

Analysis :: Profiler Trace Doesn't Capture Full MDX Query

Sep 16, 2015

I am trying to load all the MDX queries that run on a Analysis Server instance into a database for further analysis. A SQL Profiler is setup which captures the MDX queries, and when I am loading the Profiler info to database, some of the queries are not coming up in full length.The TextData field doestn't show full MDX query. When loading to the database, the field is next data type. Is there any workaround to get the complete MDX query? 

View 2 Replies View Related

SQL Profiler’s

Apr 26, 2001

Can only member in the System Administrators role use the SQL Profiler’s? Is there any other role or way to allow user to use this tool other then adding them to this role? Thanks you

View 1 Replies View Related

SQL Profiler !!

Dec 23, 1999

Does anybody have any idea if there is a bug in SQL 7.0 where running multiple traces causes the SQL 7.0 to crash ??
This is running in a clustered environment.

Thanks in advance.
Ajay

View 2 Replies View Related

Profiler

Mar 10, 1999

I've looked high and low for information regarding this problem to no avail. Profiler works fine from the local server where SQL7 is running,
(using NT security). But even though my client is multiprotocol, I cannot connect from my desktop using SQL security (ODBC error) or NT
authentication. NT security gives me ConnectionOpenRcpBindingSetAuthInfo(). I do have a valid id on the NT machine as well and am not
getting any errors in the security events log.

Can/How do you connect remotely to the profiler using TCP/IP or Mulitprotocol client?

Why doesn't NT authentication work?

Thanks in advance for any help.

View 1 Replies View Related

What Is A Profiler?

Aug 1, 2003

Hi Everybody,

Can anyone tell me what is a profiler in SQL server 7.0? What I exactly want to know is, in which practical situation u will find the profiler useful. Explaination with example will be appreciated.

Regards,

Samir.

View 3 Replies View Related

SQL Profiler

Jul 7, 2004

How do I write a process in Profiler to categorise the performance of Stored procedures into buckets of <4 secs,>4secs,between 4 and 10 secs

View 4 Replies View Related

Sql Profiler

Feb 28, 2007

Hello,

My qn is related to profiler.

my app calls an sp, say, sp_DisplayResults. in profiler, i can see multiple entries for this sp call eventhough it is invoked only once from the UI.

no other process/users is invoking the sp.

could any one please let me know why the profiler is displaying it multiple times.

im using MSSQL2k

View 2 Replies View Related

Profiler

Apr 28, 2008

I have a small doubt through profiler how can we find out the long running queries.specifically which events we have to capture.

View 2 Replies View Related

Profiler Help.

Apr 30, 2008

Hi
I need to track the connections hitting to my server through application???

I m doing some work in Profiler but i m not sure from where to start it..I m using SQL SERVER 2005...I m accesing few pages on application and that i want to track that activity involving at server side

T.I.A

View 9 Replies View Related

Profiler

May 16, 2008

I have a small doubt.
where is the ideal place to run a profiler .
can we run a profiler on production server
or we have to run profiler on a seperate instance and connect to production server

View 2 Replies View Related

SQL Profiler

Feb 28, 2006

Lets say I have a username & password , I dont want people to see it being passed on to the SQL Server.

What are the ways I can prevent the parameters being passed on .

Thanks,

Regards
Kidddddddddddddddddd

View 10 Replies View Related

SQL Profiler

Apr 20, 2006

Any one show me the basic guide or tutorial about SQL Profiler for begginer .
Thank in advance !

View 1 Replies View Related

Sql Profiler

Sep 12, 2006

hello friends sorry for this basic question.

i heard a word sql profiler.

i tried through BOL, but not got any good information how to start and from where to start. can anybody give me some brief about this

thank you very much

View 7 Replies View Related

Using Profiler

Oct 27, 2006

1/When I create a new trace, it gives me sevral events including the SQL server s own functions and provcedures. How do I tell profiler to display only the requests we send SQL server from a VB program or other company made programs instead of including sql server own events as well. That will help me filter the requests and locate the problem easily.
2/ also ,. sometimes, my text data column description gets truncated and as a result I can't see the whole text of a request.
What causes that and how can I fox it pls?
Thank you, i am not familiar with profiler.

View 3 Replies View Related

Log's / Profiler / Whatever

Nov 22, 2006

Hi hi, We had a sql express version running fine untill recently.
Now it seems cause high processor use, high memory load, etc.
So the websites being dependant on SQL start performing slower.

Is there some way to monitor what is causing this.
I can't seem to read any log files, there is no profiler in express, etc. So what options do I have?

View 2 Replies View Related

Profiler

Feb 8, 2007

im trying to use the profiler to find out which tables are still being accesses as there seems to be alot of suspected tables lying around and stored objects (sps, functions etc) can the trace profiler be used in this situation?

View 12 Replies View Related

SQL Profiler

Oct 17, 2007

When running a profiler trace for long running queries during peak usage what is a typically expected additional load the process of running it will create on that Database?


Future guru in the making.

View 4 Replies View Related

SQL Profiler

Oct 24, 2007

Hi

Can anyone tell me what is SQL profiler?its function and all.

Thanks in Advance


RKNAIR

View 4 Replies View Related

Sql Profiler

Feb 29, 2008

Dear All,
where can i found sql profiler in sql server 2005?

i'm using
Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86) Feb 9 2007 22:47:07 Copyright (c) 1988-2005 Microsoft Corporation Developer Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
Vinod
Even you learn 1%, Learn it with 100% confidence.

View 3 Replies View Related

Sql Profiler

Mar 30, 2008

I want to know if user defined functions like fn_example can be traced in profiler and what event to choose to trace functions executed.
will it displays the function being executed or just the body of the fucntion?
Thnxxxxxxxx

View 1 Replies View Related

SQL Profiler

Jul 23, 2005

HiI am just started at a new position. This organization has a number ofdatabase servers with mission critical databases. However, I have twodatabase server, 1 a test server and the other a catch all db server thatcontain a hodge podge of databases. On the test server, there are 54databases while the other has 40. I am pretty confindent that not all ofthese databases are being used. My goal is to find out which ones are nolonger needed.In an attempt to find out who/what is using these databases, I have set upSQL Profiler.My SQL profile setup is as suchObjects - Objects openedSecurity Audit - Audit Login, Login Failed, LogoutSession - Existing ConnectionStored Proc - RPC Completed, SP:StmtCompleted, SP:StmtStartingTSQL - SQL Batch completed, SQL:StmtCompletedMy data columns are the standard except I added DatabaseName.And there lies my problem that I hope someone can help. As I run the trace,all other fields seems to be working except Database Name. I see everythingbut the only way to tell what database is being accessed is looking at theSPID number and comparing it with Process Info in EM or sp_who.Does anyone have any idea why this field is not working? Am I missingsomething? Or am I just giving myself a headache for nothing because thereis an easier way to find the information I want: What the heck is going onwith these database and who is doing what on them?Thanks in advance for any and all help:)Akinja

View 2 Replies View Related

How To Run Profiler From Cmd

Feb 21, 2007

Hi,We have a requirement to run profiler continuously to find out themisbehaving applications/SQL in the dataserver. And we are notinterested in running it from an individuals local machine. Also wewant the profiler to start automatically whenever there are SQL Server/Machine restarts.Is there a way to invoke the profiler instance from cmd prompt or isthere a way to script the profiler?Thanks in advance,Thyagu.

View 1 Replies View Related

Why Do We Need SQL Profiler And How To Use It ?

Mar 3, 2008

Hello friends...I want to ask that Why do we need SQL Profiler as SQL Database Developer and How to use it ?

How can I know about that ?

View 4 Replies View Related

Sql Profiler?

Oct 18, 2007

I have the following values on a sql 2000 box, are these values high?


scale 0 to 100

Page/Sec = 0 to 5
Avg. Disk Queue Length = 40 to 50
% Processor Time = 85 to 100

View 1 Replies View Related

How Do I Run SQL Profiler

Sep 12, 2007

I read in a thread that to understand better how a package is run I need to run the SQL Profiler.

How do I run the SQL Profiler?.
thanks

View 4 Replies View Related

SQL Server Profiler

Oct 16, 2006

Hi guys, I'd just like to know how to setup a new Trace in SQL Server Profiler that tells me every time the database is hit with a query. Thanks.

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved