Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Sybase > Re: Query plans
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 3 of 3 Topic 2398 of 2544
Post > Topic >>

Re: Query plans

by jefftyzzer <jefftyzzer@[EMAIL PROTECTED] > Feb 5, 2008 at 04:25 PM

On Feb 5, 3:05 pm, b...@[EMAIL PROTECTED]
 wrote:
> On Feb 5, 1:33 pm, jefftyzzer <jefftyz...@[EMAIL PROTECTED]
> wrote:
>
>
>
> > Friends:
>
> > In Sybase 12.5.3, is the SQL within a stored procedure precompiled and
> > the query plan stored somewhere (e.g., a package a la DB2 and/or in
> > the data dictionary)? I'm speaking just of static SQL, BTW.
>
> > Basically, I'm wondering if, by default, Sybase reoptimizes a
> > procedure the first time it's called. Usually one of the benefits if
> > SPs (beyond encapsulation) is that the SQL has already been parsed and
> > an execution plan determined.
>
> > Is this where abstract plans come in?
>
> > Thanks,
>
> > --Jeff
>
> When you create a procedure, the TSQL source code is parsed and
> normalized into a query tree structure, which is stored in
> sysprocedures.  The query tree specifies what data is to be retrieved
> from which objects, but not how that is to be done.  When a procedure
> is called and there is no available query plan in the procedure cache
> (as would be the case the first time a proc was called after being
> created, a reboot, or a load of a dump, or if all cached plans were
> currently in use), ASE  p***** the query tree to the optimizer, which
> compiles a new query plan which is stored in procedure cache and then
> executed.
>
> The term "compile" in ASE means to generate a query plan from a query
> tree.


Thank you, Bret. This answers my question completely.

--Jeff
 




 3 Posts in Topic:
Query plans
jefftyzzer <jefftyzzer  2008-02-05 12:33:53 
Re: Query plans
bret@[EMAIL PROTECTED]   2008-02-05 15:05:50 
Re: Query plans
jefftyzzer <jefftyzzer  2008-02-05 16:25:58 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Wed Oct 15 22:01:02 CDT 2008.