Jorg Just two possibilities to quickly rule out before all the more complex possibilities are debated: - check that the datatypes of the PL/SQL variables are all appropriate and no implicit datatype conversions are taking place - I expect pos_num is a NUMBER; is l_tmp_num1 also? - check that the there's no NLS conversion issues (language or character set) Regards Nigel 2009/6/10 Joerg Jost <joerg.jost@xxxxxxxxxxxx> > Hi list, > > the following SQL leads to an execution plan which is absolutely wrong. > > SELECT pos_komnr > FROM po > WHERE pos_art = l_tmp_art1 > AND pos_num = l_tmp_num1 > AND pos_pos = l_tmp_pos; > >