Re: Struggling to Optimize The Query
(The NDB forum might be a better place.)
How many different values are possible for `mapping*key`? It seems like it might be better to use a `SET` datatype instead of the 5 varchar columns. Then all of this:
and ((`mcmk`.`mapping1_key` = 'API_KEY')
or (`mcmk`.`mapping2_key` = 'API_KEY')
or (`mcmk`.`mapping3_key` = 'API_KEY')
or (`mcmk`.`mapping4_key` = 'API_KEY')
or (`mcmk`.`mapping5_key` = 'API_KEY')
)
and ((`mcmk`.`mapping1_key` = 'API_METHOD')
or (`mcmk`.`mapping2_key` = 'API_METHOD')
or (`mcmk`.`mapping3_key` = 'API_METHOD')
or (`mcmk`.`mapping4_key` = 'API_METHOD')
or (`mcmk`.`mapping5_key` = 'API_METHOD'))
would turn into
AND ( mapping_keys & ... = ... )
Where the ... is the number representing (API_KEY | METHOD).
Or perhaps the 5 columns should be turned into up to 5 rows in another table.
Subject
Views
Written By
Posted
1708
July 27, 2016 09:05AM
748
July 27, 2016 10:27AM
Re: Struggling to Optimize The Query
781
July 29, 2016 06:07PM
701
August 02, 2016 07:07AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.