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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Re: SQL help needed

Re: Re: SQL help needed

From: Tanel Poder <tanel.poder.003_at_mail.ee>
Date: Thu, 18 Sep 2003 03:04:41 -0800
Message-ID: <F001.005D05ED.20030918030441@fatcity.com>


> You raise an interesting idea in my mind...
>
> How useful would it be for us if Oracle created an INFINITE_DUAL table -
> One where you could select as many rows as you wished. I guess it might
be
> dangerous but it would at least be very efficient if Oracle coded it as a
> special table. Then you could just do things like "select rownum from

Btw, Oracle's current DUAL table isn't very efficient, if you have very heavy tight loops selecting from dual, you might want to experiment with local dual table with only one row in it (put an unique index on it), or use IOT with one row, or create a view on x$dual and select from there (the view is requires for non sys-users being able to select from x$ table). The x$ part get's kind of hacking, but seems to be the fastest. Also, if you use a custom dual table, you should analyze it as well if using CBO, for sys.dual table CBO knows that there's only one row, but for custom one you have to have statistics.

Tanel.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Tanel Poder
  INET: tanel.poder.003_at_mail.ee

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Thu Sep 18 2003 - 06:04:41 CDT

Original text of this message

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