almost everything plugin other than FB supports it ... i added bind variable support into FB recently, but it ends up being a net performance loss without prepared statement caching down in JDBCContext/Channel. Oracle has implicit statement caching in the jdbc driver, so you get a performance win regardless. I don't know about PG, offhand.
ms On Nov 17, 2009, at 12:46 PM, Shravan Kumar. M wrote: > Wow!!! Is it, its a new learning, thanks Huss. > > We use Frontbase, and the query sent to DB has the values substituted from > the logs. Do you know which DB support the bind variables concept coming to > IN clause. I believe Oracle/ Sybase should do it!!! > > From: John Huss <[email protected]> > To: Ricardo J. Parada <[email protected]> > Cc: Shravan Kumar. M <[email protected]>; WO Dev Group > <[email protected]> > Sent: Tue, November 17, 2009 10:42:14 PM > Subject: Re: ERXInQualifier bug - repeating last element extra 5 times > > If your DB supports "bind variables" or parameterized queries you get SQL > sort of like: > > WHERE key IN (?, ?, ?, ?, ?, ?, ?, ?, ?) > > and the values are supplied afterwards. The DB server may be able to prepare > for this query and run it faster the next time even if the actual values > change because the SQL stays the same - just question marks. It is an > optimization. > > John > > On Mon, Nov 16, 2009 at 10:49 PM, Ricardo J. Parada <[email protected]> wrote: > > When I tried it, the ERXInQualifier generated SQL for only the desired values > and without repeating the last one. Actually I did not set that property, I > used the padToSize in the constructor. And then I noticed that the default > padToSize comes from that property by looking at the ERXInQualifier source > code. > > Like I said, I don't know what the padding is for. I read the documentation > but it did not answer that to me. It mentions something about bind variables > and reducing the number of unique queries. But I still don't get it. :-) > > Here it is: > > public ERXInQualifier(String key, > NSArray values, > int padToSize) > Constructs an in qualifer for a given attribute name and an array of values. > > Parameters: > key - attribute name > values - array of values > padToSize - the size which is expected to be reasonable for this qualifier. > If the NSArray values has more than one element, the padToSize is used to > round up the number of elements and pad with nulls. Doing this reduces the > number of unique queries which result from having an arbitrary number of > values. For example, if the padToSize is 8, then we'll either have 1, or 8, > or 16, or... bind variables as compared to 1..., 2..., 3..., 4..., or ....16 > > > > On Nov 16, 2009, at 11:39 PM, Shravan Kumar. M wrote: > >> Oh is it! I will try out this option today!!! >> >> Will changing this option as advised effect any other parts of Wonder/ >> ERXtensions - "er.extensions.ERXInQualifier.DefaultPadToSize=1" >> >> Actually, due to this padding we had an SQL overflow once, but people did >> not recognize that this was caused by ERXInQualifier duplication of values... >> >> From: Ricardo J. Parada <[email protected]> >> To: Shravan Kumar. M <[email protected]> >> Cc: WO Dev Group <[email protected]> >> Sent: Tue, November 17, 2009 2:12:05 AM >> Subject: Re: ERXInQualifier bug - repeating last element extra 5 times >> >> Yes I noticed that too. I don't quite understand what the padding does but >> I think you may set the following property to 1 and it may behave the way >> you are expecting it: >> >> er.extensions.ERXInQualifier.DefaultPadToSize=1 >> > > > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list ([email protected]) > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/webobjects-dev/johnthuss%40gmail.com > > This email sent to [email protected] > > > _______________________________________________ > Do not post admin requests to the list. They will be ignored. > Webobjects-dev mailing list ([email protected]) > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com > > This email sent to [email protected]
_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to [email protected]
