Showing posts with label execution. Show all posts
Showing posts with label execution. Show all posts

Thursday, March 22, 2012

Distinct Function

Hi All,

I have used Distinct function in my mdx query to remove duplicate
values.

I want to know what performance effect it will have on execution of
query.

With large volume of data query is taking more time to execute with
Distinct function. If we remove it it is taking less time.

Any inputs is appreciated.

Raghu

Depends on the query, but usually it has no effect on the performance. Distinct function doesn't look at cell values - it dedups tuples from the set. And if it is placed on the axis of SELECT query, then before getting cell values, the AS engine performs Distinct internally anyway. So it would be interesting to see your exact scenario to understand why you see performance difference.

Wednesday, March 21, 2012

Displaying variable values after execution

Hello,

I have just developed my first full package and it has been, ahem, an adventure- but I can see the power of SSIS. I am splitting 1M rows in to up to 11 parts (therefore up to 11M rows) for several files and it takes a matter of seconds!

I have used some variables in the package and would like to see the results of these at the end of execution. They are purely for interest at the moment.

I think I can output them to a flat file, but is it possible to output them to the Immediate window at the end of execution?

I can not figure out how to have a watch on them either- is this possible? Ideally I would like a counter on screen next to my loop containers.

All of the web pages I have seen regarding debugging seem to assume that VB is being used to create the package.

Thanks,

Alan.

I'm not sure how the output the variables to the Immediate window. You could log them, or output them to a flat file, as you suggested.

You can put a watch on them. To do this, set a breakpoint on a task (right-click on it). Pick on towards the end of your packageif you want to see the values at the end. When you run the package and it hits the breakpoint, you can type the variable name into the watch window.

|||You could also use a script component to issue a MsgBox, but that would only be handy when debugging.

Displaying variable values after execution

Hello,

I have just developed my first full package and it has been, ahem, an adventure- but I can see the power of SSIS. I am splitting 1M rows in to up to 11 parts (therefore up to 11M rows) for several files and it takes a matter of seconds!

I have used some variables in the package and would like to see the results of these at the end of execution. They are purely for interest at the moment.

I think I can output them to a flat file, but is it possible to output them to the Immediate window at the end of execution?

I can not figure out how to have a watch on them either- is this possible? Ideally I would like a counter on screen next to my loop containers.

All of the web pages I have seen regarding debugging seem to assume that VB is being used to create the package.

Thanks,

Alan.

I'm not sure how the output the variables to the Immediate window. You could log them, or output them to a flat file, as you suggested.

You can put a watch on them. To do this, set a breakpoint on a task (right-click on it). Pick on towards the end of your packageif you want to see the values at the end. When you run the package and it hits the breakpoint, you can type the variable name into the watch window.

|||You could also use a script component to issue a MsgBox, but that would only be handy when debugging.

Tuesday, February 14, 2012

Display estimated execution plan problem

Hi all,
I have a complex query inside a stored procedure. When I try to see the
estimated query plan from Query Analyzer it hangs (I wait for at least one
minute).
When I stoped the QA with the red button it answers with a syntax error...
But there aren't syntax errors... I tried to do the same in another
environment and all things work.
Any idea?
Thank you very much!!
Alexandre Calderaro
Avanade Italy
Hi Alex my colleage :-)
Same Compatibility level ? If you use another compat. level some
statements might not be able to compile.
HTH, Jens K. Suessmeyer.
http://www.sqlserver2005.de

Display estimated execution plan bug

Hello. I'm using SQL2000, and I have a problem.
Each time I try to display estimated execution plan in Query Analyzer, the
graphical plan shows optimization costs 0%, 100%, or 600%, and the cost is
shown only for the first step. I installed sp4, but that didn't change
anything. I know I can use showplan_all, but it's better to have a graphical
display. I saw on Microsoft's web pages that this is a bug
(http://support.microsoft.com/defaul...Ben-us%3B274643), but
they are saying that it comes in some cases and I get it all the time.
Please help.
Draen Grabovac.Did you try to change the windows regional settings so that the decimal sepa
rator is . and not , ?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Grabi" <drazen@.git.hr> wrote in message news:dvjiib$kjf$1@.ss405.t-com.hr...
> Hello. I'm using SQL2000, and I have a problem.
> Each time I try to display estimated execution plan in Query Analyzer, the
> graphical plan shows optimization costs 0%, 100%, or 600%, and the cost is
> shown only for the first step. I installed sp4, but that didn't change
> anything. I know I can use showplan_all, but it's better to have a graphic
al
> display. I saw on Microsoft's web pages that this is a bug
> (http://support.microsoft.com/defaul...Ben-us%3B274643), but
> they are saying that it comes in some cases and I get it all the time.
> Please help.
> Draen Grabovac.
>

Display Estimated Execution Plan

Dear all,
I obtain a warning when I press the 'Display Estimated Execution Plan'
for the following sp:
up_Rpt_Data_Contents_Bridge_Wholesaler '2005-01-01','COW'
Server: Msg 208, Level 16, State 1, Procedure
up_Rpt_Data_Contents_Bridge_Wholesaler, Line 42
Invalid object name '#PERIODS'.
Query Analyzer is parsing all the contents for that object? Just a temp
table.
How can reckon something if not exists yet?
Thanks in advance and best regards,This is called "delayed name resolution" or something like that... SQL wil
l
repeast the name resolution when it executes the SP. Then, it checks the
actual code and makes sure that you are indeed creating a table named
#PERIODS.
"Enric" wrote:

> Dear all,
> I obtain a warning when I press the 'Display Estimated Execution Plan'
> for the following sp:
> up_Rpt_Data_Contents_Bridge_Wholesaler '2005-01-01','COW'
> Server: Msg 208, Level 16, State 1, Procedure
> up_Rpt_Data_Contents_Bridge_Wholesaler, Line 42
> Invalid object name '#PERIODS'.
>
> Query Analyzer is parsing all the contents for that object? Just a temp
> table.
> How can reckon something if not exists yet?
>
> Thanks in advance and best regards,|||Thanks for your feedback
"Enric" wrote:

> Dear all,
> I obtain a warning when I press the 'Display Estimated Execution Plan'
> for the following sp:
> up_Rpt_Data_Contents_Bridge_Wholesaler '2005-01-01','COW'
> Server: Msg 208, Level 16, State 1, Procedure
> up_Rpt_Data_Contents_Bridge_Wholesaler, Line 42
> Invalid object name '#PERIODS'.
>
> Query Analyzer is parsing all the contents for that object? Just a temp
> table.
> How can reckon something if not exists yet?
>
> Thanks in advance and best regards,|||Since your procedure creates a temp table and with "Estimated" no code is ex
ecuted, SQL Server
cannot show the plan as the table isn't created. Select Show execution plan"
and instead.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Enric" <Enric@.discussions.microsoft.com> wrote in message
news:BC203C72-A62E-460C-95FC-B2D707AD60DD@.microsoft.com...
> Dear all,
> I obtain a warning when I press the 'Display Estimated Execution Plan'
> for the following sp:
> up_Rpt_Data_Contents_Bridge_Wholesaler '2005-01-01','COW'
> Server: Msg 208, Level 16, State 1, Procedure
> up_Rpt_Data_Contents_Bridge_Wholesaler, Line 42
> Invalid object name '#PERIODS'.
>
> Query Analyzer is parsing all the contents for that object? Just a temp
> table.
> How can reckon something if not exists yet?
>
> Thanks in advance and best regards,|||It has been very useful.
Best wishes,
"Tibor Karaszi" wrote:

> Since your procedure creates a temp table and with "Estimated" no code is
executed, SQL Server
> cannot show the plan as the table isn't created. Select Show execution pla
n" and instead.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> http://www.sqlug.se/
>
> "Enric" <Enric@.discussions.microsoft.com> wrote in message
> news:BC203C72-A62E-460C-95FC-B2D707AD60DD@.microsoft.com...
>
>