Hello,
I'm looking a strange behaviour on my Sybase 12.5 when executing a simple query :
select T.*
from TABLE1 T, TABLE_JOB J
where J.SESSID = 0
and T.ELEMENTID = J.ELEMENTID
TABLE1 is a table of 80.000 rows, have an non-custered index on ELEMENTID
TABLE_JOB is a table of 1 to 100 rows, have non clustered index on SESSID.
Normally, TABLE_JOB must be scanned on first step before using the index of the TABLE1. But, the plan show on first a table scan of TABLE1 when TABLE_JOB have more than 10 rows and the right plan if TABLE_JOB have fewer rows or is empty !
I did :
1 - update statistics of two tables
2 - updating the two tables locks to datarows
3 - deleting indexes of TABLE_JOB
but, the same behaviour keep on.
Who had a similar problem, where the size of a table in a join can disturb the right execution plan ? The server is recenty installed, perhaps i forgot making the right value of a configuration parameter, which one ?
I can't imagine that this mad things are produced by a well-known DBMS like Sybase !! Without solution, I think of working in the future with Oracle and losting my fisrt investment in Sybase !
Thanks et sorry for my bad english.
I'm looking a strange behaviour on my Sybase 12.5 when executing a simple query :
select T.*
from TABLE1 T, TABLE_JOB J
where J.SESSID = 0
and T.ELEMENTID = J.ELEMENTID
TABLE1 is a table of 80.000 rows, have an non-custered index on ELEMENTID
TABLE_JOB is a table of 1 to 100 rows, have non clustered index on SESSID.
Normally, TABLE_JOB must be scanned on first step before using the index of the TABLE1. But, the plan show on first a table scan of TABLE1 when TABLE_JOB have more than 10 rows and the right plan if TABLE_JOB have fewer rows or is empty !
I did :
1 - update statistics of two tables
2 - updating the two tables locks to datarows
3 - deleting indexes of TABLE_JOB
but, the same behaviour keep on.
Who had a similar problem, where the size of a table in a join can disturb the right execution plan ? The server is recenty installed, perhaps i forgot making the right value of a configuration parameter, which one ?
I can't imagine that this mad things are produced by a well-known DBMS like Sybase !! Without solution, I think of working in the future with Oracle and losting my fisrt investment in Sybase !
Thanks et sorry for my bad english.