![]() | |
![]() |
| | Thread Tools | Display Modes |
#21
| |||
| |||
|
|
What is the execution plan? In SQL*Plus use the command (i hope i get this right) "SET AUTOT TRACE EXP STAT", and run the query, then post the output here. Well, this was indeed right. Congratulations. Could those records bve ignored? If so, use a WHERE clause to exclude such a case, such as, AND A.Value1 > 0 AND A.Value2 > 0 ... AND A.Value10 > 0. This should be discussed. But I think they should be shown also. (+) is Oracle specific, just like *= is SQL Server specific. All support the ANSI syntax, however. I was aware of this, but to lazy to convert the statement into standard SQL ;-( An EXPLAIN PLAN would probably be helpful here as well. .... The execution plan does not reveal any problem, I guess, whereas the plain statement does. It never returns. |
#22
| |||
| |||
|
|
For the time being, perhaps you can try them to see if there is a difference. |
|
I don't like the SQL standard syntax for JOINs. So, you'll get no argument from me. ![]() |
#23
| |||||
| |||||
|
|
Please let us know which exact version and platform you are using. |
|
There are some outer join bugs, but not generally on anything this simple AFAIK. |
|
Are you seeing your cpu pegged? |
|
Do you know how to check for wait states with Oracle? |
|
Anything else going wrong, errors in the alert log? |
#24
| |||
| |||
|
|
Please let us know which exact version and platform you are using. |
#25
| |||
| |||
|
|
Hi Joel, Please let us know which exact version and platform you are using. Oracle 10g on Windows There are some outer join bugs, but not generally on anything this simple AFAIK. Well, I understand. Are you seeing your cpu pegged? No. I did not look on the server yet. The client gets in a time out after a while. So it looks like Oracle never returns. Do you know how to check for wait states with Oracle? No. Please tell me. |
|
Anything else going wrong, errors in the alert log? Did not look at it yet. Will have to soon. Oracle 10g 10.0.2.1.0 on Windows 2003 64 bit No patch so far installed. |
#26
| |||
| |||
|
|
I donīt like it too. In the real world I have written a conversion program which does this on our application on the fly. There the appropriate parameters gets defined and the program create either the Oracle syntax, or the standard syntax, depending on database in use. |
#27
| |||
| |||
|
|
Is there really any DBMS (you're application deals with) which doesn't support ANSI joins? |
|
Watch out and check the expected result set, there are differences between ANSI and proprietary outer joins (not only for Oracle but also for e.g. MS SQL and DB2) as soon as you add some search conditions. Whereas if you implement ANSI style the answer set will always be the same on any DBMS. |
|
When you're too lazy, i'll do it for you, but only this time ;-) SELECT * FROM Foo A LEFT JOIN Foo B ON B.WP = A.WP AND B.Curr_Ms = A.Curr_Ms AND B.Value_Group = 21 LEFT JOIN Foo C ON C.WP = A.WP AND C.Curr_Ms = A.Curr_Ms AND C.Value_Group = 22 LEFT JOIN Foo D ON D.WP = A.WP AND D.Curr_Ms = A.Curr_Ms AND D.Value_Group = 23 LEFT JOIN Foo E ON E.WP = A.WP AND E.Curr_Ms = A.Curr_Ms AND E.Value_Group = 24 LEFT JOIN Foo F ON F.WP = A.WP AND F.Curr_Ms = A.Curr_Ms AND F.Value_Group = 25 WHERE A.Value_Group = 11 |
#28
| |||
| |||
|
|
Watch out and check the expected result set, there are differences between ANSI and proprietary outer joins (not only for Oracle but also for e.g. MS SQL and DB2) as soon as you add some search conditions. Whereas if you implement ANSI style the answer set will always be the same on any DBMS. |
![]() |
| Thread Tools | |
| Display Modes | |
| |