How to make sure a table is in cache?

michael_hk
12-19-2003, 04:11 AM
I have a table that will be read by every visitor of my website (ASP / SQL Server), I want to ensure the table is in RAM for every access. Originally I plan to store everything from the table into an application-level dictionary object, but due to the thread issue, it is not possible.

So any suggestion?

Thanks

KnooKie
12-19-2003, 06:23 AM
I have a table that will be read by every visitor of my website (ASP / SQL Server), I want to ensure the table is in RAM for every access. Originally I plan to store everything from the table into an application-level dictionary object, but due to the thread issue, it is not possible.

So any suggestion?

Thanks

table variables may be your answer, what version of SQL Server are you using though ?

If 2000 then check this link............
http://www.sqlteam.com/item.asp?ItemID=9454

michael_hk
12-19-2003, 10:23 PM
Thanks KnooKie. But how can different visitors share the same table variable?

Yes, I am using SQL Server 2000.

joenuvo
12-20-2003, 01:20 PM
if Table variable declare as Global, it can access from as is it is real table.

CREATE TABLE ##tablename (table def.....)

Optikal
12-20-2003, 02:04 PM
he is trying to store the table data in memory at the web server tier, not on the database server tier.

If you are using ASP.Net it has built-in caching features: http://msdn.microsoft.com/library/en-us/cpguide/html/cpconcacheapis.asp

If you not using .Net then I have no idea.

michael_hk
12-21-2003, 03:46 AM
Thanks for all the replies.

Let me clarify:

1. I am using ASP 3.0 / SQL Server 2000
2. The ASP pages are on web server, and the DB is on another server
3. I want to cache the table in web server so that all queries (99% of the queries are "Select") run against that table can be efficient

Any solution :confused: ?

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum