Stored Procedures
Posted in 2000
Topics: Stored Procedures & SPL
I was merrily creating stored procedures today when I ran over a conundrum (don't worry, it's getting better) We have a development box and an active one, and the stored procedures are for a new set of tables which have not yet gone active. However, due to the way permissions, etc. are set up, it's much easier to create the new procedures on the active database and automatically echo them to the test DB. So how is it I can successfully compile an SP on a database that doesn't contain the tables the SP is accessing? I thought the point of SP's was that parsing and optimization of the SQL's were already done.
A stored procedure is not optimized. Instead, the individual SQL statements within the procedure are individually optimized. Statements with all parameters known at creation time are optimized there and then. Otherwise, they are optimized at run time. -- Bashar Chalabi CTL, London Demus, Alan <demusa@hastings-ent.com> wrote in message news:86agkb$of2$1@news.xmission.com... > > I was merrily creating stored procedures today > when I ran over a conundrum (don't worry, it's getting better) > > We have a development box and an active one, and the > stored procedures are for a new set of tables which have > not yet gone active. However, due to the way permissions, etc. > are set up, it's much easier to create the new procedures on the > active database and automatically echo them to the test DB. > > So how is it I can successfully compile an SP on a database that > doesn't contain the tables the SP is accessing? I thought the > point of SP's was that parsing and optimization of the SQL's were > already done. > >