Re: Difference between "copy from" and "insert .. select"
Date: Tue, 5 Nov 2002 11:17:50 -0600
Message-ID: <33Tx9.102$lo4.60948_at_news.uswest.net>
It sounds like you've hit on one of the main differences already. COPY FROM and INSERT ... SELECT are actually different *types* of commands. COPY FROM is a SQL*Plus command, so it will execute on the computer that is running SQL*Plus - this is why you see rows copied to and from your machine. INSERT ... SELECT, on the other hand, is a SQL command, and will run inside the database server. There are obviously times when this is preferable - such as when the "from" and "to" data are on the same instance. The main advantage of the COPY FROM command, I guess, would be that it allows you to move data from one instance to another one, but you could do that with database links and normal SQL commands and still avoid all the network traffic to the client.
Hope this helps.
-- Cheers, Chris ___________________________________ Chris Leonard, The Database Guy http://www.databaseguy.com Brainbench MVP for Oracle Admin http://www.brainbench.com MCSE, MCDBA, MCT, OCP, CIW ___________________________________ "P. van der Ven" <google_at_pven.tmfweb.nl> wrote in message news:39bfb0cd.0211041346.2b667fae_at_posting.google.com...Received on Tue Nov 05 2002 - 18:17:50 CET
> Hi!
>
> I am trying to find out the differences between the "copy
> from"-command (CF) and the "insert ... select"-command (IS).
>
> Until now I have only found out one difference: when you copy from dbA
> to dbB using CF in SQL*plus on your own PC the data will go from dbA
> through your SQL*plus-session to dbB. When using IS you can copy
> directly from dbA to dbB.
>
> What is the advantage of CF or IS? (I am very interested in the
> performance.)
>
> Regards,
> P. van der Ven