Width maximum and ORA-1445 for the selection of the field.

Hello

We recently had the ORA-01445 error in the database.

A friend of mine directed me to the following address:
http://www.ErrorHelp.com/search/details/65019/ora-01445

And explained to me that Oracle takes all fields in all the tables in internal and external joins to build a HUGE table before choosing which fields are really needed for the query.

I can't believe that Oracle made such stupid thing so I ran here for ask the experts.

An example:

Two tables:

TABLE1:
-----------
Field1
Field2
...
Field100



TABLE2
----------
Field1
Field2
...
Field500


Select table1.champ1, table2.champ1
FROM table1
INNER JOIN table2 on table1. Field2 = table2. Field2
WHERE table1.champ3 = '1'


->
It is:

How the join is based on detail?


If it generates an intermediate table with 100 + 500 = 600 fields to not get the 5 that are used in the query (table1.champ1, table2.champ1, table1. Field2, table2. Field2, table1.field3)?


Thank you.
Sincere greetings,

864737 wrote:
Hi John,.

Maybe it's a complete nonsense, but even if has no instance of sense which way solved the issue.

I have a request who suddenly cannot run with the described error, version 10.2.0.3 but it does not happens in 10.2.0.4. As a solution, we did it using Subselects and join as described in the post and the query reworked.
If ORA-01445 is triggered even if this isn't the cause of the error. You have there a circumstance where it fits...

So, it is clearly a bug introduced (possibly in 10.2.0.3) and fixed with 10.2.0.4.

I can't post the query because of license restrictions but believe or not, this happens with Oracle. It is good to know that the number of tables fields is not serious. I was surprised to hear it. But your clarification was good. : D Tnx.

It seems that our DBA found that this behavior can be corrected by an official patch.

Which clearly indicates a bug, just be sure that the patch is really good.

Thanks again for your response.

There are a number of bugs in MOS around ansi joins this error, bug
4369235.8 ORA-1445 may occur for queries to ANSI join with great views/subqueries

seems possiblefor your case. However, workaround for this was to not use ansi style joins, once again, the number of columns is not directly the cause of the error.

John

Tags: Database

Similar Questions

Maybe you are looking for