I have a dashboard which displays 5 live totals calculated using 5 separate SELECT count (*)
queries. The result of these is inserted into the page with
Using rdr As SqlDataReader = db.ExecDataReader(qry1)
rdr.Read()
qa1.InnerText = rdr(rdr.GetName(0))
End Using
Using rdr As SqlDataReader = db.ExecDataReader(qry2)
rdr.Read()
qa2.InnerText = rdr(rdr.GetName(0))
End Using
Is there any way to reduce load time? I tried joining all the queries with UNION and in SQL SMS it takes a few seconds off the time, but I don't know how to pull each 'row' from the result.
That said, it is still 12 seconds in Server Management Studio which is still undesirable for a dashboard. Are my hands tied by our infrastructure?