473,399 Members | 3,401 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,399 software developers and data experts.

how good is the information from EXPLAIN?

Hello,

doing some investigations with the EXPLAIN statement
I wonder about the quality from the plan_table.

for different kind of selects I expected that
an index with two columns is used in a join.
the table ERRORCODE has an index on the columns
SYSTEMCODE, ERRORCODE.

the results in the plantable gives 1 in MATCHCOLS
in both of the following queries.

1)
.....
FROM
COMPANY a
JOIN
RECEIPT b
ON
a.COMPANY_ID = b.COMPANY_ID
JOIN
ERRORCODE c
ON
a.SYSCODE = c.SYSTEMCODE
AND a.ERROR_CODE = c.ERRORCODE

2)
.....
FROM
COMPANY a
, RECEIPT b
, ERRORCODE c
WHERE
a.COMPANY_ID = b.COMPANY_ID
AND a.SYSCODE = c.SYSTEMCODE
AND a.ERROR_CODE = c.ERRORCODE

any ideas? what do I miss?

tia
michael tepperis-von der ohe
Nov 12 '05 #1
1 1266
I see this happen all the time when the column definitions for
ERROR_CODE and ERRORCODE are not the same. Frequently one is numeric
while the other is character.

It's always helpful to include table definitions when asking this type
of question.

Phil Sherman
Michael TEpperis wrote:
Hello,

doing some investigations with the EXPLAIN statement
I wonder about the quality from the plan_table.

for different kind of selects I expected that
an index with two columns is used in a join.
the table ERRORCODE has an index on the columns
SYSTEMCODE, ERRORCODE.

the results in the plantable gives 1 in MATCHCOLS
in both of the following queries.

1)
....
FROM
COMPANY a
JOIN
RECEIPT b
ON
a.COMPANY_ID = b.COMPANY_ID
JOIN
ERRORCODE c
ON
a.SYSCODE = c.SYSTEMCODE
AND a.ERROR_CODE = c.ERRORCODE

2)
....
FROM
COMPANY a
, RECEIPT b
, ERRORCODE c
WHERE
a.COMPANY_ID = b.COMPANY_ID
AND a.SYSCODE = c.SYSTEMCODE
AND a.ERROR_CODE = c.ERRORCODE

any ideas? what do I miss?

tia
michael tepperis-von der ohe


Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

24
by: matty | last post by:
Go away for a few days and you miss it all... A few opinions... Programming is a craft more than an art (software engineering, not black magic) and as such, is about writing code that works,...
22
by: JavaJunkie | last post by:
When I got the following posting on Monster.com I almost puked. See http://jobsearch.monster.com/getjob.asp?JobID=20663147 They want candidates from IIT (Indian Institute of Technology) / REC...
72
by: E. Robert Tisdale | last post by:
What makes a good C/C++ programmer? Would you be surprised if I told you that it has almost nothing to do with your knowledge of C or C++? There isn't much difference in productivity, for...
7
by: TAVOSOFT | last post by:
Hi friends, I am begginer , I wanna to learn VB2005 ,Which are good book for to learn VB2005 of level -begginer-intermediate. Thanks you friends.
45
by: dolphin | last post by:
Is it a good thing that program mix C and C++?
206
by: WaterWalk | last post by:
I've just read an article "Building Robust System" by Gerald Jay Sussman. The article is here: http://swiss.csail.mit.edu/classes/symbolic/spring07/readings/robust-systems.pdf In it there is a...
3
by: Lars Johansen | last post by:
HI are there any recommended books for an sysadmin who has been mostly writing shell scripts, but want to move up to create more complex programs.
0
by: WebCM | last post by:
I hope you can spend some time and help me to select proper application design and programming issues. :) I'm making new version of CMS. I've been mostly theorizing about it for a recent months. ...
23
by: tonytech08 | last post by:
What I like about the C++ object model: that the data portion of the class IS the object (dereferencing an object gets you the data of a POD object). What I don't like about the C++ object...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.