> I am using SELECT * and changing it to a listing of the 
> columns(changing the statement) has caused it to refresh. But 
> going back to SELECT * still gets the cached data.

Here is my understanding of what happens.

If you use "SELECT *", the database will have to resolve what "*" is, before
it builds its plan. The plan gets cached in addition to the SQL statement
that generates it, so if you use the same SQL statement you get the same
plan. I would strongly recommend that you avoid "SELECT *" for this and
other reasons.

> I was hoping for a way to clear it by changing something in 
> the page, requesting the new page and then changing back the 
> code to what I had originally.
> 
> And no sooner had I typed the above this worked. I change the 
> formatting of the query, dropped it into three lines instead 
> of one. Are statement really cached in this manner? Adding a 
> carriage return causes a recompile? Strange!

I'm not sure that's the same across all databases, but the literal SQL
statement is what the database uses to determine whether to reuse an
existing cached plan or create a new plan, so it shouldn't be that
surprising.

Dave Watts, CTO, Fig Leaf Software
http://www.figleaf.com/

Fig Leaf Software provides the highest caliber vendor-authorized 
instruction at our training centers in Washington DC, Atlanta, 
Chicago, Baltimore, Northern Virginia, or on-site at your location. 
Visit http://training.figleaf.com/ for more information!


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:200061
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to