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

Home -> Community -> Usenet -> c.d.o.server -> Re: A Question regarding null columns.

Re: A Question regarding null columns.

From: Sybrand Bakker <postbus_at_sybrandb.demon.nl>
Date: Mon, 01 Jul 2002 22:14:13 +0200
Message-ID: <std1iu0p7do1cjfp1n1dfp1nf1ivu317i7@4ax.com>


On Mon, 1 Jul 2002 18:44:52 +0100, "Telemachus" <telemachus_at_ulysseswillreturn.net> wrote:

>Thanks Sybrand but
>
>SQL>
>SQL> exec
>DBMS_STATS.GATHER_TABLE_STATS('DATA_HOLDER','ERASEME',NULL,NULL,FALSE,
>'FOR ALL COLUMNS SIZE 1',NULL,'DEFAULT',TRUE);
>
>PL/SQL procedure successfully completed.
>
>SQL> explain plan for select count (*) from eraseme where object_id is null;
>
>Explained.
>
>SQL> set long 32000
>SQL> set linesize 32000;
>SQL> @ ?/rdbms/admin/utlxplp.sql
>
>Plan Table
>----------------------------------------------------------------------------
>----
>----------------------------
>| Operation | Name | Rows | Bytes| Cost | TQ
>|IN-OUT|
>PQ Distrib | Pstart| Pstop |
>----------------------------------------------------------------------------
>----
>----------------------------
>| SELECT STATEMENT | | 1 | 4 | 1 | |
>|
> | | |
>| SORT AGGREGATE | | 1 | 4 | | |
>|
> | | |
>| TABLE ACCESS FULL |ERASEME | 1 | 4 | 1 | |
>|
> | | |
>----------------------------------------------------------------------------
>----
>----------------------------
>
>6 rows selected.
>
>SQL> >
>
>even tried cleaning out plan_table to see if xplp was looking at old rows
>(No change)
>
>Anyone want to try it on their own database on a larger table and see what
>they get ?

Why provide all the details, when people responding here are all clairvoyant.
The experiment requested above is also unnecessary. NULL is nothing, doesn't compare with anything, so NO index, by design.

Regards

Sybrand Bakker, Senior Oracle DBA

To reply remove -verwijderdit from my e-mail address Received on Mon Jul 01 2002 - 15:14:13 CDT

Original text of this message

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