Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: O9i: bind variable questions (special)
Thorsten Kettner schrieb am 05.04.2007 in
<1175760346.203786.110180_at_y80g2000hsf.googlegroups.com>:
Thank you for your answer.
In my special case there are 5 columns, that can be interesting.
SELECT
..
FROM
..
WHERE
CIDNEBENANLAGE = <one value of 20> -- or in one case <>, see 1*
AND CISTGEFAELLT = <0 or 1> -- 2*
AND CSTRASZE = <one value of 500> -- 3*
AND CVNK = <one value of 5000> -- 4*
AND CNNK = <one value of 5000> -- 4*
AND (CSMO = <one value of 50> or CSMU = <one value of 50>) --5a*
AND (CSMO in <a few values of 50> or CSMU = <a few values of 50>) --5b*
I decided to try the following
1*) BIND- Variable, if not used DUMMY- NULL, maybe with SQL-HINT
INDEX(TABLE),
NO BIND, if DUMMY- NULL
2*) 3 cases -> no bind 3*) bind, or clause falls out if not asked for 4*) bind, or clause falls out if not asked for5a*) bind
so there are 3*3*2*2*2*(2 or many) different versions, in best case about 150 different queries.
If I use NULL instead of '0000000000', and I think next version will go
that way, the 3 cases stay. If the BIND- Variable- system doesn't work I
can easy go back to the other system.
The only reason I do not use NULL instead of '0000000000' now is, that I
do not know, whether all application versions outside become slow in
that situation. The current application version I will run against both
DB versions to make sure the performance is good. If there is no old
version outside I will change '00..' to NULL.
Andreas Mosmann
-- wenn email, dann AndreasMosmann <bei> web <punkt> deReceived on Thu Apr 05 2007 - 04:29:01 CDT