467,883 Members | 1,223 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,883 developers. It's quick & easy.

load from cursor

Raj
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

Mar 13 '06 #1
  • viewed: 1846
Share:
2 Replies
I do not know the answer to your question. However, a side note:
The export runs for 3 hours everyday because of a very complex sql...


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.

Mar 13 '06 #2
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

Mar 13 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

7 posts views Thread by jane | last post: by
reply views Thread by Christian H | last post: by
2 posts views Thread by Paul Cheetham | last post: by
5 posts views Thread by Paul Cheetham | last post: by
3 posts views Thread by db2udbgirl | last post: by
1 post views Thread by peteh | last post: by
5 posts views Thread by mike_dba | last post: by
1 post views Thread by Ultrak The DBA | last post: by
reply views Thread by MrMoon | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.