Re: Serial value in a Stored Procedure
Posted in 1994
> We recently figured out how to do this with a trigger that sets a > global variable that the stored procedure knows about: > ================ > Dennis J. Pimple Dennis, I wish you had figured that one out a little earlier. We've just finished a project where we reselect the row to get the serial number issued because Informix told us that there wasn't any other way to get it. Off course now that's it been pointed out, it's obvious and I probably should have thought of it myself!! My question is what are the performance trade-offs between this approach and reselecting. Will there be a big enough difference between the two to make recoding worthwhile either across the entire application or just where we already have performance issues or not at all? By the way, all our selects to get the serial value occur immediately following the insert statements in the stored procedures, they only get the serial value and they always use an alternative unique key in the where clause. Cheers - Jim My opinions are my own. They may vary with time but they remain MINE! ---------------------------------------------------------------------- Name: Jim Gordon Internet: jgordon@ssf-sys.DHL.COM Company: DHL Systems Inc Phone: (415) 375-5222 (Work) Address: 700 Airport Blvd. #300 (415) 775-7762 (Home) Burlingame, CA 94010-1937 Fax: (415) 375-5019 ----------------------------------------------------------------------