|
Home > Archive > MS SQL Server > June 2005 > Select Statment
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| Mariame 2005-06-28, 7:23 am |
| Hi Everyone,
I Heard That there is a Select statment that get the duration that sql
server spent to get the result & where is the hole in it, if it takes a long
time.
Anyone know the sentence???
Thx in Adv
| |
| Uri Dimant 2005-06-28, 7:23 am |
| Mariame
SELECT statement without WHERE condition?
"Mariame" < mariame_waguih@hotma
il.com> wrote in message
news:ewFrWK8eFHA.3620@TK2MSFTNGP09.phx.gbl...
> Hi Everyone,
> I Heard That there is a Select statment that get the duration that sql
> server spent to get the result & where is the hole in it, if it takes a
long
> time.
> Anyone know the sentence???
> Thx in Adv
>
>
| |
| Jens Süßmeyer 2005-06-28, 7:23 am |
| Did you try:
SET SHOWPLAN_ALL ON
--OR
SET SHOWPLAN_TEXT ON
?
Information about that is shown in the BOL.
HTH, Jens Suessmeyer.
---
http://www.sqlserver2005.de
---
"Mariame" < mariame_waguih@hotma
il.com> schrieb im Newsbeitrag
news:ewFrWK8eFHA.3620@TK2MSFTNGP09.phx.gbl...
> Hi Everyone,
> I Heard That there is a Select statment that get the duration that sql
> server spent to get the result & where is the hole in it, if it takes a
> long time.
> Anyone know the sentence???
> Thx in Adv
>
| |
| Mariame 2005-06-28, 7:23 am |
| Thx for ur reply
This 2 statment work alone without select statment,
I Wonder if in case of select statment with where condition like "Select *
from Accounts where username like '%m%'"
Could I measure how much time it takes from Sql Server to get the result &
where is the problem if this statment takes much time than expected???
"Jens Süßmeyer" < Jens@Remove_this_For
_Contacting.sqlserver2005.de> wrote in
message news:uvmm0P8eFHA.3280@TK2MSFTNGP09.phx.gbl...
> Did you try:
>
> SET SHOWPLAN_ALL ON
> --OR
> SET SHOWPLAN_TEXT ON
>
> ?
>
> Information about that is shown in the BOL.
>
> HTH, Jens Suessmeyer.
>
> ---
> http://www.sqlserver2005.de
> ---
> "Mariame" < mariame_waguih@hotma
il.com> schrieb im Newsbeitrag
> news:ewFrWK8eFHA.3620@TK2MSFTNGP09.phx.gbl...
>
>
| |
| Jens Süßmeyer 2005-06-28, 7:23 am |
| >> This 2 statment work alone without select statment,
Yes, but they make no sense without a DML OR Select statement, unless you
only only want to execute those statements for some reason.
You won´t get the direct calculated time for the Select statement. If it
perhaps lasts twohours to query some data and you want to display some kind
of status bar in (Thats a often asked question here) your frontend, you
would have to execute that two time (one time for getting the time that it
needs and a second turn to do the actual query). But you can see within the
output of the statements what kind of actions SQLServer will perform to get
the data / to process the query. Analysing this will help you to speed up
your queries.
HTH, Jens Suessmeyer.
"Mariame" < mariame_waguih@hotma
il.com> schrieb im Newsbeitrag
news:e1txzX8eFHA.3040@TK2MSFTNGP14.phx.gbl...[color=darkred]
> Thx for ur reply
> This 2 statment work alone without select statment,
> I Wonder if in case of select statment with where condition like "Select *
> from Accounts where username like '%m%'"
> Could I measure how much time it takes from Sql Server to get the result &
> where is the problem if this statment takes much time than expected???
>
> "Jens Süßmeyer" < Jens@Remove_this_For
_Contacting.sqlserver2005.de> wrote
> in message news:uvmm0P8eFHA.3280@TK2MSFTNGP09.phx.gbl...
>
>
| |
| Steen Persson \(DK\) 2005-06-29, 9:23 am |
| In which cases do you want the time to be shown? If you run the query in QA,
you can try turning on
Show Client Statistics
Show Server Trace
SET STATISTICS TIME
SET STATISTICS IO
Some of the above might give you the information you need. None of them will
directly tell you why a statement takes much longer than expectd, but Show
Server Trace combined with a trace on the server might give you some hints.
Regards
Steen
Mariame wrote:[color=darkred
]
> Thx for ur reply
> This 2 statment work alone without select statment,
> I Wonder if in case of select statment with where condition like
> "Select * from Accounts where username like '%m%'"
> Could I measure how much time it takes from Sql Server to get the
> result & where is the problem if this statment takes much time than
> expected???
> "Jens Süßmeyer" < Jens@Remove_this_For
_Contacting.sqlserver2005.de>
> wrote in message news:uvmm0P8eFHA.3280@TK2MSFTNGP09.phx.gbl...
|
|
|
|
|