Answer the question
In order to leave comments, you need to log in
ASP.NET Webcache or SQL which is better?
I thought about three things, but I did not find it in open sources:
1) How long does it take to establish a connection to the database?
2) How long does it take to fetch from cache and add?
3) How long does it take to execute a SELECT?
In general, to the point.
I have from 10 to 80 requests per second with these actions:
1) open a connection.
2) SELECT in 0.02 ms (this data from the top is the most resource-intensive requests)
3) SELECT is performed in 0.03 ms (this data from the top is the most resource-intensive requests)
So, I thought about WebCache.
This is how I use a db connection. Is there something faster?
using (SqlConnection connection = new SqlConnection(connectionString))
{
connection.Open();
..
}
Cache.Get("key");
Cache.Insert("key", data, dep, DateTime.Now.AddSeconds(3600), Cache.NoSlidingExpiration, CacheItemPriority.High, null);
SELECT name FROM users WHERE [email protected];
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question