Create table as subquery performance
From: Bruce Douglas <bruce.douglas_at_bridge.bst.bls.com>
Date: 1996/10/23
Message-ID: <326E7A80.1725_at_bridge.bst.bls.com>#1/1
Bruce Douglas -- bruce.douglas_at_bridge.bst.bls.com BellSouth Telecommunications
Received on Wed Oct 23 1996 - 00:00:00 CEST
Date: 1996/10/23
Message-ID: <326E7A80.1725_at_bridge.bst.bls.com>#1/1
I'm using a reporting tool that makes extensive use of Oracle's CREATE TABLE X AS SELECT * FROM Y syntax. I'm tracking down a performance problem and have discovered this:
CREATE TABLE X AS SELECT * FROM Y takes much longer than breaking the process into pieces:
CREATE TABLE X; INSERT INTO X SELECT * FROM Y;
In the trivial example I'm testing, the elapsed time drops from 6 minutes to 5 seconds.
Can someone point me in the right direction? What's going on here?
As always, thanks in advance for your help.
Bruce Douglas -- bruce.douglas_at_bridge.bst.bls.com BellSouth Telecommunications
Received on Wed Oct 23 1996 - 00:00:00 CEST