Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

sp plan

2 posts in General Discussion Last posting was on 2010-01-15 07:51:30.0Z
Tina Posted on 2010-01-15 00:31:40.0Z
Sender: 39ed.4b4fb67c.1804289383@sybase.com
From: Tina
Newsgroups: sybase.public.ase.general
Subject: sp plan
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4b4fb76b.3a03.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 14 Jan 2010 16:31:40 -0800
X-Trace: forums-1-dub 1263515500 10.22.241.41 (14 Jan 2010 16:31:40 -0800)
X-Original-Trace: 14 Jan 2010 16:31:40 -0800, 10.22.241.41
Lines: 8
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:28881
Article PK: 78124

i am new devlper so sorry for simple query,

we hv all sp's, the sp plan is created in proc cache. when
proc is run it reuse plan stored in proc cahce.

so why to upd stats when proc plan is not re-created when
proc is called? If proc plan is recreated then what is the
use of having proc cache and storing plans?


mpeppler@peppler.org [Team Sybase] Posted on 2010-01-15 07:51:30.0Z
From: "mpeppler@peppler.org [Team Sybase]" <michael.peppler@gmail.com>
Newsgroups: sybase.public.ase.general
Subject: Re: sp plan
Date: Thu, 14 Jan 2010 23:51:30 -0800 (PST)
Organization: http://groups.google.com
Lines: 15
Message-ID: <89c542af-8a31-4602-8a72-d11dacdfbada@26g2000yqo.googlegroups.com>
References: <4b4fb76b.3a03.1681692777@sybase.com>
NNTP-Posting-Host: 170.148.198.157
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1263541890 12624 127.0.0.1 (15 Jan 2010 07:51:30 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 15 Jan 2010 07:51:30 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: 26g2000yqo.googlegroups.com; posting-host=170.148.198.157; posting-account=9rHMzAoAAADtzToS8d2WKVGlkISAvPdk
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.1.7) Gecko/20091221 Firefox/3.5.7,gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!newsfeed.yul.equant.net!novia!news-out.readnews.com!news-xxxfer.readnews.com!postnews.google.com!26g2000yqo.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:28884
Article PK: 78126


On Jan 15, 1:31 am, Tina wrote:
> i am new devlper so sorry for simple query,
>
> we hv all sp's, the sp plan is created in proc cache. when
> proc is run it reuse plan stored in proc cahce.
>
> so why to upd stats when proc plan is not re-created when
> proc is called? If proc plan is recreated then what is the
> use of having proc cache and storing plans?

Actually - when you run update statistics Sybase marks the procs that
use those tables for recompilation - so the next time the proc is
called it will get recompiled (i.e. re-optimized) before execution.

Michael