The following two statements (strongly simplyfied) returning a different result:
with a fix value for rownmun:
select * from table
where rownum <= 12;
with bind variable for rownum:
select * from table
where rownum <= :maxsize;
I know, Orcale is using a different execution plan due to internal statistics, but imho even if the choosen plans are different , the result should be the same. I'm using a Oracle 10g.
My dba skills are limited, therefore I would appreciate any hint or advice, that helps me to understand this strange behaviour.