johndanter
Legendary Poster
Hello there!
I've been given the job of seeing why certain reports take an eon to run.
Looking in the log there are a load of SQLs over F0901 and F0902.
How can I tell by looking at an SQL statement which indexes should be on a table or not?
EG: SELECT * FROM PRODDTA.F0902 WHERE ( GBAID = '04847745' AND GBSBL = '00999954' AND GBLT = 'AU' AND GBFY > 5.000000 ) ORDER BY GBFY ASC
Will this use an index on where statement or the Order by part?
Also am I right in thinking the order in which we write our Set Data Selections in a UBE has nothing to do with the ORDER in which the SQL will be generated?
i.e If I have a UBE and I say Set Data Selection on table x = column A then Column C then Column B
my SQL will be
select from table X where A = C = B =
But my index on table X is ABC......should I put my ER code as A B C?
I know JDE table I/O asks you for the index but I want to know where the index will come from on a UBE when all you've specified is the BSVW
Hope this make sense lol
I'm just asking for help on looking at SQLs and seeing which index should be there. Which is more important, the Order by or the actual where = columns
And I'd like to do this outside the SQL Enterprise Manager SQL Analyse tool just by looking at an SQL
thanks guys
John
I've been given the job of seeing why certain reports take an eon to run.
Looking in the log there are a load of SQLs over F0901 and F0902.
How can I tell by looking at an SQL statement which indexes should be on a table or not?
EG: SELECT * FROM PRODDTA.F0902 WHERE ( GBAID = '04847745' AND GBSBL = '00999954' AND GBLT = 'AU' AND GBFY > 5.000000 ) ORDER BY GBFY ASC
Will this use an index on where statement or the Order by part?
Also am I right in thinking the order in which we write our Set Data Selections in a UBE has nothing to do with the ORDER in which the SQL will be generated?
i.e If I have a UBE and I say Set Data Selection on table x = column A then Column C then Column B
my SQL will be
select from table X where A = C = B =
But my index on table X is ABC......should I put my ER code as A B C?
I know JDE table I/O asks you for the index but I want to know where the index will come from on a UBE when all you've specified is the BSVW
Hope this make sense lol
I'm just asking for help on looking at SQLs and seeing which index should be there. Which is more important, the Order by or the actual where = columns
And I'd like to do this outside the SQL Enterprise Manager SQL Analyse tool just by looking at an SQL
thanks guys
John