2014 Mar 04 2:56 PM
Hi All,
Could you please check whether the attached select statement syntax is appropriate.
I have notification ID in the where clause so should I add the VIQMEL table in the FROM clause or is this fine - I am getting the values correctly.
2014 Mar 04 3:28 PM
You are getting the desired result, VIQMEL is already included (two lines below the commented out line, otherwise there would be a syntax error), so what is the issue?
Nice join, by the way
Thomas
2014 Mar 04 3:28 PM
You are getting the desired result, VIQMEL is already included (two lines below the commented out line, otherwise there would be a syntax error), so what is the issue?
Nice join, by the way
Thomas
2014 Mar 04 3:38 PM
2014 Mar 04 4:35 PM
2014 Mar 04 7:07 PM
Hello John,
It is very good that you used INNER JOINS instead of FOR ALL ENTRIES.
Appreciate your work. Maintain the same.
INNER JOIN looks fine and make sure that you used the fields in the order as it is appearing in the table, I mean the same index as in the tables.
Regards,
Thanga
2014 Mar 04 7:36 PM
Thanga Prakash wrote:
... and make sure that you used the fields in the order as it is appearing in the table, I mean the same index as in the tables.
I assume you mean the ON- and WHERE-conditions. Please note that this is also a myth.
The order of the fields does not matter, presence or absence of fields does matter (a lot).
If you have an index with fields A, B and C in that order, you might as well write ... WHERE C = ... AND B = ... AND A = ...
Compare yourself with an example program if in doubt.
Thomas
2014 Mar 04 7:46 PM
Hello Thomas,
Thanks for the explanation, will check it. Also can you please give me some points on how to increase the performance of INNER JOINS.
Regards,
Thanga
2014 Mar 04 7:53 PM
The most important thing:
Make sure all ON- and WHERE-conditions make effective use of the primary or a secondary index of the involved tables.
"Effective" means having EQ-conditions for as many fields of that index as possible, top down without gaps.
Thomas
2014 Mar 04 7:58 PM
Hello Thomas,
Even I meant to say the same in my last line of the statement, to use Index. Might be i have not used correct sentence to convey it.
Regards,
Thanga
2014 Mar 04 8:38 PM
make sure that you used the fields in the order as it is appearing in the table
What did you want to convey here? The same order as they appear in the index, is it?
2014 Mar 04 8:50 PM
Hello Suhas,
I mean to say try to use the index available in those tables.
Regards,
Thanga
2014 Mar 04 7:16 PM
2014 Mar 04 7:54 PM