How to enforce query plan in sybase IQ

120 views
Skip to first unread message

pd

unread,
Apr 22, 2014, 10:56:08 AM4/22/14
to iq...@googlegroups.com
I have 2 similar queries. Query does a join of data table to config table. Both the queries have same config table , but has different data table. When I see the query plan for each of it , it is different. Is it possible to enforce the query plan on one query to use plan from another query.

Jeff Younce

unread,
Apr 25, 2014, 8:17:16 PM4/25/14
to iq...@googlegroups.com
Unlike ASE, I don't think IQ can force a "Hint"


On Tue, Apr 22, 2014 at 10:56 AM, pd <pjm...@gmail.com> wrote:
I have 2 similar queries. Query does a join of data table to config table. Both the queries have same config table , but has different data table. When I see the query plan for each of it , it is different. Is it possible to enforce the query plan on one query to use plan from another query.

--
You received this message because you are subscribed to the Google Groups "iqug" group.
To unsubscribe from this group and stop receiving emails from it, send an email to iqug+uns...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Manish Negandhi

unread,
Apr 26, 2014, 12:03:37 AM4/26/14
to iq...@googlegroups.com
if both the queries are using different indexs, you can try forcing indexes in IQ query plan or you can also instruct optimizer to avoid using any index. This is done in IQ by using  'i' option  in your query or by using set option INDEX_PREFERENCE  , here are examples

Using Hints


Using INDEX_PREFERENCE 


On Tue, Apr 22, 2014 at 8:26 PM, pd <pjm...@gmail.com> wrote:
I have 2 similar queries. Query does a join of data table to config table. Both the queries have same config table , but has different data table. When I see the query plan for each of it , it is different. Is it possible to enforce the query plan on one query to use plan from another query.

--
Reply all
Reply to author
Forward
0 new messages