August 21, 2012 at 5:01 am
Is this what you want to do? http://sqlinthewild.co.za/?now_reading_library=true
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
August 21, 2012 at 5:05 am
GilaMonster (8/21/2012)
Is this what you want to do? http://sqlinthewild.co.za/?now_reading_library=true
Yes! That's it exactly. Well, except for the Statistics box on top.
August 21, 2012 at 6:09 am
It's the Now Reading Redux plugin. No custom dev required at all http://wordpress.org/extend/plugins/now-reading-redux/
You'll need an amazon associate ID to look up books, plus an amazon web services account (it's free)
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
August 21, 2012 at 7:18 am
dwain.c (8/21/2012)
It has been a rare experience for me to post a question to this forum, but I will now. How about a poll?Yesterday I was called upon to go back and look at the first SP I ever wrote (about 15 months ago). The SP is quite complicated, so much so that during its development nobody on the development team could do it right. So I wrote it from scratch, and with my very limited SQL experience at the time, I did the unspeakable and solved the problem with 2 nested CURSORs. That's right - 2 CURSORs! :w00t: In my defence I will say that this occurred before I adoped my mantra. π
Sometime after that, and after writing one other SP that contains a CURSOR (1 only, I swear!), I stumbled upon a statement by someone (can't remember who) that said "in your career you should write no more than 5 CURSORs." I take some solace in the fact that my total stands at 3 and I've never again had to resort to one since I came across that quotation.
So now onto my question.
If I rewrite this SP to use 1 or 0 CURSORs, will the SQL-verse acknowledge this reduction in my career CURSOR usage and lower my career total CURSOR count?
There are a number of cases where you simply have no recourse but to use a cursor or a loop. The two I've written recently, one queries a folder and imports all the files it finds and one checks a table and sends a customized email for each row. There have likely been others, but those are the two that come to mind immediately.
--------------------------------------
When you encounter a problem, if the solution isn't readily evident go back to the start and check your assumptions.
--------------------------------------
Itβs unpleasantly like being drunk.
Whatβs so unpleasant about being drunk?
You ask a glass of water. -- Douglas Adams
August 21, 2012 at 8:12 am
GilaMonster (8/21/2012)
It's the Now Reading Redux plugin. No custom dev required at all http://wordpress.org/extend/plugins/now-reading-redux/You'll need an amazon associate ID to look up books, plus an amazon web services account (it's free)
I at least owe you Beverage of Choice or some other item of equitable value for this information. Thank you.
August 21, 2012 at 8:25 am
Brandie Tarvin (8/21/2012)
At my workplace, we forbid the Devs to use cursors. It's part of our db standards. Any time they want to go against standards, they have to justify it with a well-reasoned business case. Most of the time they can't.
If they can justify it, though, we actually do bend and allow the code. It's just that we don't want Devs writing cursors because that's what they know.
That's been my approach. It's a rule until it needs an exception. Then we grant it.
August 21, 2012 at 8:26 am
Brandie Tarvin (8/21/2012)
[\quote]
You ask Andy W? He's done a bunch with his blog.
August 21, 2012 at 11:35 am
GilaMonster (8/21/2012)
It's the Now Reading Redux plugin. No custom dev required at all http://wordpress.org/extend/plugins/now-reading-redux/You'll need an amazon associate ID to look up books, plus an amazon web services account (it's free)
Looking at the plugin, I do like the format. Unfortunately some of the books I've written for aren't propagated to Amazon. Which means the plugin doesn't do everything I need it to do. I need a page to display all my works, and to be able to segregate those works between the fiction and non-fiction stuff.
Thanks for pointing me in the right direction, though, Gail.
August 21, 2012 at 11:36 am
Steve Jones - SSC Editor (8/21/2012)
Brandie Tarvin (8/21/2012)
Tangent: Do any WordPress gurus have time to help me with my website? I'm not rich, but maybe we can come up with a payment arrangement?You ask Andy W? He's done a bunch with his blog.
I have not asked Andy W yet. I need to see if I still have a current email address from him. Thank you for reminding me of local guruness. @=)
August 21, 2012 at 11:40 am
Brandie Tarvin (8/21/2012)
GilaMonster (8/21/2012)
It's the Now Reading Redux plugin. No custom dev required at all http://wordpress.org/extend/plugins/now-reading-redux/You'll need an amazon associate ID to look up books, plus an amazon web services account (it's free)
Looking at the plugin, I do like the format. Unfortunately some of the books I've written for aren't propagated to Amazon. Which means the plugin doesn't do everything I need it to do. I need a page to display all my works, and to be able to segregate those works between the fiction and non-fiction stuff.
Thanks for pointing me in the right direction, though, Gail.
You can add books manually. No splits though.
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
August 21, 2012 at 11:50 am
GilaMonster (8/21/2012)
Brandie Tarvin (8/21/2012)
GilaMonster (8/21/2012)
It's the Now Reading Redux plugin. No custom dev required at all http://wordpress.org/extend/plugins/now-reading-redux/You'll need an amazon associate ID to look up books, plus an amazon web services account (it's free)
Looking at the plugin, I do like the format. Unfortunately some of the books I've written for aren't propagated to Amazon. Which means the plugin doesn't do everything I need it to do. I need a page to display all my works, and to be able to segregate those works between the fiction and non-fiction stuff.
Thanks for pointing me in the right direction, though, Gail.
You can add books manually. No splits though.
Oh, YAY! (Obviously haven't been able to play with it yet). Definitely will get it downloaded and play with it then.
August 21, 2012 at 1:20 pm
dwain.c (8/21/2012)
It has been a rare experience for me to post a question to this forum, but I will now. How about a poll?Yesterday I was called upon to go back and look at the first SP I ever wrote (about 15 months ago). The SP is quite complicated, so much so that during its development nobody on the development team could do it right. So I wrote it from scratch, and with my very limited SQL experience at the time, I did the unspeakable and solved the problem with 2 nested CURSORs. That's right - 2 CURSORs! :w00t: In my defence I will say that this occurred before I adoped my mantra. π
Sometime after that, and after writing one other SP that contains a CURSOR (1 only, I swear!), I stumbled upon a statement by someone (can't remember who) that said "in your career you should write no more than 5 CURSORs." I take some solace in the fact that my total stands at 3 and I've never again had to resort to one since I came across that quotation.
So now onto my question.
If I rewrite this SP to use 1 or 0 CURSORs, will the SQL-verse acknowledge this reduction in my career CURSOR usage and lower my career total CURSOR count?
Dwain, the problem is that you mis-quoted the quote. It should be "in your career, you should have no more than 5 cursors that you wrote active in production at any one time". So, this obviously allows for the SQLverse to perform a running total and see that you have reduced your sins.
Wayne
Microsoft Certified Master: SQL Server 2008
Author - SQL Server T-SQL Recipes
August 21, 2012 at 3:08 pm
Hmmm, I think that I accidentally used my old (very old) account. sorry ...
August 21, 2012 at 7:02 pm
WayneS (8/21/2012)
dwain.c (8/21/2012)
It has been a rare experience for me to post a question to this forum, but I will now. How about a poll?Yesterday I was called upon to go back and look at the first SP I ever wrote (about 15 months ago). The SP is quite complicated, so much so that during its development nobody on the development team could do it right. So I wrote it from scratch, and with my very limited SQL experience at the time, I did the unspeakable and solved the problem with 2 nested CURSORs. That's right - 2 CURSORs! :w00t: In my defence I will say that this occurred before I adoped my mantra. π
Sometime after that, and after writing one other SP that contains a CURSOR (1 only, I swear!), I stumbled upon a statement by someone (can't remember who) that said "in your career you should write no more than 5 CURSORs." I take some solace in the fact that my total stands at 3 and I've never again had to resort to one since I came across that quotation.
So now onto my question.
If I rewrite this SP to use 1 or 0 CURSORs, will the SQL-verse acknowledge this reduction in my career CURSOR usage and lower my career total CURSOR count?
Dwain, the problem is that you mis-quoted the quote. It should be "in your career, you should have no more than 5 cursors that you wrote active in production at any one time". So, this obviously allows for the SQLverse to perform a running total and see that you have reduced your sins.
So does "active in production at any one time" mean running concurrently? The I could just make sure that the SPs run on different intervals and reduce my count farther. π
My thought question: Have you ever been told that your query runs too fast?
My advice:
INDEXing a poor-performing query is like putting sugar on cat food. Yeah, it probably tastes better but are you sure you want to eat it?
The path of least resistance can be a slippery slope. Take care that fixing your fixes of fixes doesn't snowball and end up costing you more than fixing the root cause would have in the first place.
Need to UNPIVOT? Why not CROSS APPLY VALUES instead?[/url]
Since random numbers are too important to be left to chance, let's generate some![/url]
Learn to understand recursive CTEs by example.[/url]
[url url=http://www.sqlservercentral.com/articles/St
Viewing 15 posts - 37,561 through 37,575 (of 66,712 total)
You must be logged in to reply to this topic. Login to reply