Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old March 13th, 2006, 05:15 PM
Raj
Guest
 
Posts: n/a
Default load from cursor

Hi,

We have a process ( a stored proc) that exports data ( about 10
million records) from a huge table,t1 and loads it into another huge
table t2. The export runs for 3 hours everyday because of a very
complex sql...

My question is can we load from the table directly instead of exporting
the data and loading it from the falt file??

like using load from cursor??

does it have any disadvantages?? when we declare a cursor where is the
result stored?? can it overflow to the disk?? people here had lots of
performance issues using cursors in a Stored proceedure...

Thanks,
Raj

  #2  
Old March 13th, 2006, 05:45 PM
Brian Tkatch
Guest
 
Posts: n/a
Default Re: load from cursor

I do not know the answer to your question. However, a side note:
[color=blue]
>The export runs for 3 hours everyday because of a very complex sql...[/color]

I do not know if this applies, but using a temp TABLE, a splitting up
the actions of the complex SQL to multiple simple SQL statements may
speed things up a bit.

I just sped up a query that took aboutone minute and forty seconds to
under a second by using a temp table instead.

B.

  #3  
Old March 13th, 2006, 06:15 PM
Shashi Mannepalli
Guest
 
Posts: n/a
Default Re: load from cursor

I don't see any disadvantages with using CURSOR except make sure only
after the LOAD only you issue a commit.
Regarding memory issues check other posts..

http://groups.google.com/group/comp....0905d2ad389953



cheers...
Shashi Mannepalli

 

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles