The project look for data from 20 tables with 1000 records of 5 different categories.
This article provide a possible solution:
Partial Class index
Protected Sub Page_LoadComplete(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.LoadComplete
Dim objCon As New SqlConnection(“server=server;User id=userid;password=password;database=databasename“)
Dim cmd As SqlCommand = New SqlCommand(“Select count(*) from ptg_hotels”, objCon)
It’s worry a little the amounts of calls to the database and the impact that may imply in performance.
Make the above call to the database 100 times.
Create a view in the database that contain all required values
Create something as batch/cron that calculate all that values and insert it in a table may be 2 times a day because its not required that values of the counting be updated all time.
Receive the values from Stored Procedure; this may be gain a little performance v’s client based counting
Lets see in the next two days what’s the approach finally used.