Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12

Help with Triggers Expand / Collapse
Author
Message
Posted Monday, April 22, 2013 3:27 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, March 21, 2014 6:12 AM
Points: 191, Visits: 634
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

Dird



Dird // Junior DBA
11g OCA
10.5 newbie
Post #1445209
Posted Monday, April 22, 2013 3:32 PM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 4:04 PM
Points: 1,743, Visits: 2,545
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

Dird



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


SQL DBA,SQL Server MVP('07, '08, '09)
I'm not fat, I'm gravity challenged.
Post #1445211
Posted Monday, April 22, 2013 3:41 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 3:16 PM
Points: 5,986, Visits: 6,931
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

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
Post #1445216
Posted Tuesday, April 23, 2013 1:15 AM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, March 21, 2014 6:12 AM
Points: 191, Visits: 634
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 // Junior DBA
11g OCA
10.5 newbie
Post #1445295
Posted Tuesday, April 23, 2013 9:53 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 4:04 PM
Points: 1,743, Visits: 2,545
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)
I'm not fat, I'm gravity challenged.
Post #1445543
Posted Tuesday, April 23, 2013 1:07 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, March 21, 2014 6:12 AM
Points: 191, Visits: 634
sys.dm_exec_cursors shows nothing =((( how do I view the underlying DDL for the dm_functions?

Dird



Dird // Junior DBA
11g OCA
10.5 newbie
Post #1445654
Posted Tuesday, April 23, 2013 6:23 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Today @ 3:16 PM
Points: 5,986, Visits: 6,931
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
Post #1445735
Posted Tuesday, April 23, 2013 11:23 PM
SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: Friday, March 21, 2014 6:12 AM
Points: 191, Visits: 634
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 :) 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

Dird



Dird // Junior DBA
11g OCA
10.5 newbie
Post #1445764
« Prev Topic | Next Topic »

Add to briefcase ««12

Permissions Expand / Collapse