Question: My site is done in ASP .NET MVC and SQL Server. I want to add a view counter feature for details page of each products in my e-ccommerce site,that is number of total hits to a page. Which is the best way to achieve this without affecting the current performance in the loading of the page .?

Answer: 
"without affecting the current performance..." 

So I suggest a 3rd party visitor stats counter tool like Google analytics.

Page specific statistics in GA:

<http://www.askdavetaylor.com/get_traffic_stats_for_a_specific_page_in_google_analytics.html>

<http://3by400.com/index.php/get-support/tutorials16/item/finding-page-specific-statistics-in-google-analytics>

Also please take a look at here; 

<http://analytics.blogspot.com/2011/09/whats-happening-on-your-site-right-now.html>
Using cookie:

```
var productId = 1;

if (Request.Cookies["ViewedPage"] != null)
{
    if (Request.Cookies["ViewedPage"][string.Format("pId_{0}",productId )] == null)
    {
        HttpCookie cookie = (HttpCookie)Request.Cookies["ViewedPage"];
        cookie[string.Format("pId_{0}",productId )] = "1";
        cookie.Expires = DateTime.Now.AddDays(1);
        Response.Cookies.Add(cookie); 

        db.Execute("UPDATE Products SET ViewCount = ViewCount + 1 WHERE ProductId = @id", new { id = productId } ); 
        db.SaveChanges();
    }
}
else
{
    HttpCookie cookie = new HttpCookie("ViewedPage");
    cookie[string.Format("pId_{0}",productId )] = "1";
    cookie.Expires = DateTime.Now.AddDays(1);
    Response.Cookies.Add(cookie); 

    db.Execute("UPDATE Products SET ViewCount = ViewCount + 1 WHERE ProductId = @id", new { id = productId } ); 
    db.SaveChanges();
}

```