Icon View Thread

The following is the text of the current message along with any replies.
Messages 21 to 24 of 24 total
Thread Non-standard behavior of INSERT INTO in stored procedure
Wed, May 25 2011 3:30 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

David

>Cursors are heresy in relational databases

Why?

Roy Lambert
Tue, May 31 2011 3:54 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Roy,

<< Cursors are heresy in relational databases

Why? >>

In other database engines like SQL Server, they can use quite a bit of
resources and can do some funky, restrictive locking that make them
less-than-ideal.  Because ElevateDB has an actual navigational interface in
addition to the SQL interface, it can use cursors without issue and very
little resource consumption.  In fact, any navigational cursors share the
same table instances and buffer managers that the internal SQL cursors use.
The only difference is that the navigational cursors always access tables
using an active index order, whereas the internal SQL cursors always access
data in a direct, "raw" way.  Either way, cursors are very lightweight
objects that sit on top of the shared table instances.

--
Tim Young
Elevate Software
www.elevatesoft.com
Tue, May 31 2011 3:56 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

David,

<< I don't know why, but when I tried INSERT INTO ... SELECT, it worked
perfectly as the only statement in EDB Manager, as part of a script SCRIPT
BEGIN <> END, but not as part of a script and inside of my CREATE PROCEDURE.
>>

Did you wrap the INSERT INTO..SELECT inside with an EXECUTE IMMEDIATE ?  Any
execution of DML/DDL SQL statements inside of a script, procedure, function,
or job must be done from the context of a PREPARE/EXECUTE or an EXECUTE
IMMEDIATE call.  EDB's SQL/PSM implementation is 100% dynamic all of the
time.

--
Tim Young
Elevate Software
www.elevatesoft.com
Wed, Jun 1 2011 2:22 AMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tim


Interesting, thanks.

Roy Lambert
« Previous PagePage 3 of 3
Jump to Page:  1 2 3
Image