Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: "WHERE 1 = 2" does strange things

Re: "WHERE 1 = 2" does strange things

From: Mark C. Stock <mcstockX_at_Xenquery>
Date: Wed, 28 Sep 2005 11:47:07 -0400
Message-ID: <HL-dnTJlCN1iJ6feRVn-sA@comcast.com>

"paulfil" <paul.filstein_at_thehartford.com> wrote in message news:1127918582.054809.102160_at_o13g2000cwo.googlegroups.com...
> "WHERE 1 = 2" is a known trick to clone table structure. It should
> create an empty table. It should work very fast.
> IT DOES NOT. At least when cloning a structure of a view.
>
> Try it and look at explain plan. For some reason, even if it should be
> absolutely clear to ORACLE optimizer that no rows ought to be return,
> it still scans indexes of the tables forming the view. On complex
> views with large tables this turns out to be a costly process.
>
> Does anybody know more effective method to clone structure of a view
> into a new table?
>

version?

samples? Received on Wed Sep 28 2005 - 10:47:07 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US