April 27, 2012 at 1:37 pm
riya_dave (4/27/2012)
i am doing it already.still not getting anything
Well then, nothing more we can do here as you refuse to provide that which we need to really help you. But then you seem resourceful enough to resolve this on your own as you have with the other problems you've posted.
April 27, 2012 at 1:41 pm
riya_dave (4/27/2012)
but without it i am getting data into seconds ,and with it its running more than 7 minutes ,still not getting data
what happens when you run just the procedure and not the insert. i would guess it will also run more than 7 min.
its not the insert that is taking so long.
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
April 27, 2012 at 1:46 pm
it snot inserting into temp7 table,
y ?
insert into @temp7
--
EXEC pPortfolioDashboard
@Portfolios = @AdjustPortfolio,
@FromDate = @FromDate,
@ToDate = @ToDate,
)
i dont find any reason.
April 27, 2012 at 1:49 pm
i am putting it in if condition,does that is the problem?
April 27, 2012 at 1:52 pm
It will insert.
What's likely happening is that the procedure takes over 7 minutes to complete and only starts retuning data in seconds. since the insert can't complete until the procedure finished (not starts), it it taking a long time.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 27, 2012 at 2:13 pm
ok.is there any other way i can take second sp 's result into first one.
April 27, 2012 at 2:21 pm
riya_dave (4/27/2012)
ok.is there any other way i can take second sp 's result into first one.
Yes, but since we can't see what you see not much chance of that happening here.
Do you really want me to say what we need to help you?
April 27, 2012 at 2:22 pm
Not without running the procedure.
I suggest you investigate why the procedure is slow. Grant Frichey's book on performance tuning is good (just search for Grant Frichey on Amazon)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 27, 2012 at 2:28 pm
hmm,the second sp also calling 3 sp inside.
ok. is there any way,u run same sp twice with different parameter ,in 1 sp.
April 27, 2012 at 2:30 pm
Sure
EXEC StoredProcName @Parameter1
EXEC StoredProcName @Parameter2
Just like that.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
April 27, 2012 at 2:48 pm
ok.its working,but now ,i just want to organize it.
like i am inserting into @temp so many times with different data,
so whatever data i insert first should come first.
i am using group by ,but not working
April 27, 2012 at 2:54 pm
Tables do not provide order, nor is there any guarantee of order. You must provide that order by using an ORDER BY on the select clause pulling the data from the table.
April 27, 2012 at 2:55 pm
Lynn Pettis (4/27/2012)
Tables do not provide order, nor is there any guarantee of order. You must provide that order by using an ORDER BY on the select clause pulling the data from the table.
and that is if you have some field to figure out which order they went into the table in. (think identity(1,1))
For performance Issues see how we like them posted here: How to Post Performance Problems - Gail Shaw[/url]
Need to Split some strings? Jeff Moden's DelimitedSplit8K[/url]
Jeff Moden's Cross tab and Pivots Part 1[/url]
Jeff Moden's Cross tab and Pivots Part 2[/url]
April 27, 2012 at 3:21 pm
ok,this is my table result
S&P 3250HOFF
S&P 3250HOFF
Julia Hoffman 3250HOFF
Performance 3267perf
Performance 3267 perf
Performance 3267 perf
Performance 3267 perf
S&P 500 25 3252 QUEN
S&P 500 3252 QUEN
Quentin Collins 3252 QUEN
i want something like this
Julia Hoffman 3250HOFF
S&P 3250HOFF
S&P 3250HOFF
Quentin Collins 3252QUEN
S&P 500 25 3252 QUEN
S&P 500 3252 QUEN
Performance 3267perf
Performance 3267 perf
Performance 3267 perf
Performance 3267 perf
the performance should always be at bottom,no matter what.
how to do this?
April 27, 2012 at 3:25 pm
ORDER BY CASE WHEN <whatever the column name is> LIKE 'Performance%' then 1 ELSE 0 END
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
Viewing 15 posts - 16 through 30 (of 32 total)
You must be logged in to reply to this topic. Login to reply