Skip to Content.
Sympa Menu

freetds - Re: SQL Server Emulation

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Norman Palardy <norm AT kirais.com>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: SQL Server Emulation
  • Date: Wed, 20 Jun 2001 09:24:10 -0600


> Unless your query winds up using different indexes depending on the
> parameters it's provided, there's no advantage to using "with recompile".

It does, radically different ones, depending on parameters which is the sole
reason we do use with recompile. I know Sybase mentions this behaviour and
why you'd use with recompile in their Performance and Tuning classes.

Without it we get a query plan which is optimal for some parameter values,
and definitely suboptimal for others.

This is one of the big drawbacks to parameterized stored procs. They don't
re-evaluate the query plan based on the parameters automatically unless you
use with recompile.

We use stored procs to hide the implementation of various tables, the
required joins, etc from but they don't necessarily buy us any performance
advantages.

On some of our less active tables a proc can be very fast because the plan
is only created once and simply reused over and over so that whole
compilation step is avoided.





Archive powered by MHonArc 2.6.24.

Top of Page