Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Help with Triggers


Help with Triggers

Author
Message
Dird
Dird
SSC Veteran
SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)

Group: General Forum Members
Points: 212 Visits: 771
ScottPletcher (4/22/2013)

unless you use cursors, and nobody wants that


And you think that solution isn't implicitly using cursors?

Edit: But yeah, it's a better way of doing it :-P

Dird


Dird
ScottPletcher
ScottPletcher
Hall of Fame
Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)

Group: General Forum Members
Points: 3946 Visits: 6684
Dird (4/22/2013)
ScottPletcher (4/22/2013)

unless you use cursors, and nobody wants that


And you think that solution isn't implicitly using cursors?

Edit: But yeah, it's a better way of doing it :-P

Dird



I know my solution isn't using cursors, implicitly or otherwise.

SQL DBA,SQL Server MVP('07, '08, '09)

Prosecutor James Blackburn, in closing argument in the "Fatal Vision" murders trial: "If in the future, you should cry a tear, cry one for them [the murder victims]. If in the future, you should say a prayer, say one for them. And if in the future, you should light a candle, light one for them."
Evil Kraig F
Evil Kraig F
SSCertifiable
SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)

Group: General Forum Members
Points: 5699 Visits: 7660
Dird (4/22/2013)
ScottPletcher (4/22/2013)

unless you use cursors, and nobody wants that


And you think that solution isn't implicitly using cursors?

Edit: But yeah, it's a better way of doing it :-P

Dird


There's no cursor in his solution. Are there engine internal execution loops based on the internal objects of the plan? Ask Microsoft, but everything in a PC loops eventually. Is it a cursor? Most definately not.


- Craig Farrell

Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

For better assistance in answering your questions | Forum Netiquette
For index/tuning help, follow these directions. |Tally Tables

Twitter: @AnyWayDBA
Dird
Dird
SSC Veteran
SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)

Group: General Forum Members
Points: 212 Visits: 771
Evil Kraig F (4/22/2013)

There's no cursor in his solution.

Is there any documentation/book which proves this? Oracle would be running implicit cursors here; I have a hard time believing sql server doesn't since so much of this rdbms is "coincidentally" similar

I'm unable to test now (at work) but I'll run a similar kind of operation on a large table later & query sys.dm_exec_cursors

Dird


Dird
ScottPletcher
ScottPletcher
Hall of Fame
Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)Hall of Fame (3.9K reputation)

Group: General Forum Members
Points: 3946 Visits: 6684
Dird (4/23/2013)
Evil Kraig F (4/22/2013)

There's no cursor in his solution.

Is there any documentation/book which proves this? Oracle would be running implicit cursors here; I have a hard time believing sql server doesn't since so much of this rdbms is "coincidentally" similar

I'm unable to test now (at work) but I'll run a similar kind of operation on a large table later & query sys.dm_exec_cursors

Dird



Oracle uses cursors (its version of a cursor) for all queries.

Do you have any evidence whatsoever that SQL uses cursors for this type of code?

SQL DBA,SQL Server MVP('07, '08, '09)

Prosecutor James Blackburn, in closing argument in the "Fatal Vision" murders trial: "If in the future, you should cry a tear, cry one for them [the murder victims]. If in the future, you should say a prayer, say one for them. And if in the future, you should light a candle, light one for them."
Dird
Dird
SSC Veteran
SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)

Group: General Forum Members
Points: 212 Visits: 771
sys.dm_exec_cursors shows nothing =((( how do I view the underlying DDL for the dm_functions?

Dird


Dird
Evil Kraig F
Evil Kraig F
SSCertifiable
SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)SSCertifiable (5.7K reputation)

Group: General Forum Members
Points: 5699 Visits: 7660
Dird (4/23/2013)
sys.dm_exec_cursors shows nothing =((( how do I view the underlying DDL for the dm_functions?

Dird


dm exec cursors, if I remember right, only displays explicitly called cursors.

What you're calling a cursor in Oracle doesn't really fit here. Now, I'm not an Oracle expert by any means, Junior at best, but they handle data *very* differently than SQL Server does for optimization.

What you really want to inspect is the Execution Plans for queries to start learning how SQL Server handles things under the hood. I recommend you start with Grant Fritchey's book. It's available for free on the site as a PDF download. You'll find it over in the left navigation bar under Books.


- Craig Farrell

Never stop learning, even if it hurts. Ego bruises are practically mandatory as you learn unless you've never risked enough to make a mistake.

For better assistance in answering your questions | Forum Netiquette
For index/tuning help, follow these directions. |Tally Tables

Twitter: @AnyWayDBA
Dird
Dird
SSC Veteran
SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)SSC Veteran (212 reputation)

Group: General Forum Members
Points: 212 Visits: 771
Evil Kraig F (4/23/2013)
What you really want to inspect is the Execution Plans for queries to start learning how SQL Server handles things under the hood. I recommend you start with Grant Fritchey's book. It's available for free on the site as a PDF download.


It's on my to-do list Smile along with Bolton's "Professional SQL Server 2012 Internals and Troubleshooting" and like 7 other books that are supposed to be good :s Need to focus on Sybex's MCITP book for now though then the pocket consultant, self target of 70-450 near the end of May :o 4-5 weeks studying of SQL Server under my belt so far, 4 more weeks to go...unless the practice test is a disaster in 3 weeks time Crying

Dird


Dird
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search