- Dathan Vance Pattishall - Sr. Programmer and mySQL DBA for FriendFinder Inc. - http://friendfinder.com/go/p40688
-->-----Original Message----- -->From: sean peters [mailto:[EMAIL PROTECTED] -->Sent: Monday, October 27, 2003 11:54 AM -->To: Dathan Vance Pattishall -->Subject: Re: bind params and default values -->INSERT INTO my_table (A, B) VALUES ( COALESCE(?, A), COALESCE(?, B) ) --> -->I think this should work, but am now wondering how much time this will -->actually save me. I say this because in this situation, even though the -->query -->is preparsed, mysql still needs to calculate the coalesce values each -->time. mySQL currently does not respect prepare, although 5.0 will. So, it will not save you anytime. --> -->Im really weighing potential time tradeoffs here. --> -->My other thought is to create prepared queries for each combination of -->fields -->that will show up for my insert queries. Because of the nature of my -->task, -->there should only be about 10-20 queries for each table for each process, -->which isnt horrible to store, but then my perl script needs to take the -->time -->to decide which cached query to use, and again, i think that i haven't -->gained -->anything timewise. Well remember for your proposal to work in the manner stated above you will need to have a statement handle, thus you need a connection established to the mysql server for the 10-20 SQL commands. 10-20 connections remaining persistent can become a problem later on if your concern about scale. Also since mysql does not support prepare like Oracle does YET, you might just be better off looking for speed in other areas such as tuning the mysql server or looking at your table structure: rem keys etc. -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]