selecting ? selecting of 1., 2. , 3., 4., 5., 6. is slow (1-3 second) then selecting of 7.,8.,9. go on is so fast (0.1 second or more fast).. how can i get fast for selecting of 1., 2. , 3., 4., 5., 6

hello friends
selecting of 1., 2. , 3., 4.(sometime even 5., 6.) is slow (1-3 second) then selecting of 7.,8.,9.(sometimes 5., 6.,) go on is so fast (0.1 second or more fast).. how can i get fast for selecting of 1., 2. , 3., 4., 5., 6. is slow ?? recordcount is almost 1.050.000.. i do selecting 1.2.3. go on same page with treeview1.. treeview1 in masterpage.master..
gridview1 and datasource1 are in pagelist.aspx (it connets datasource1)..productnumber is primarykey for index.. kategori, kategori1 and kategori2, price, datemin are index from keys/index in table1 (right clicking menu).. they seems in gridview1 :)
Page Load 
If Request("arama1") IsNot Nothing Then
TextBox1.Text = Request("arama1")
aramal1.Text = Request("arama1")
End If
If Request("arama2") IsNot Nothing Then
TextBox2.Text = Request("arama2")
aramal2.Text = Request("arama2")
End If
If Request("arama3") IsNot Nothing Then
aramal3.Text = Request("arama3")
TextBox3.Text = Request("arama3")
End If
End If
'Dim cn As New SqlConnection(ConfigurationManager.ConnectionStrings("ConnectionString").ToString)
Dim yeni1 As String
If aramal3.Text = "" And aramal2.Text = "" Then
yeni1 = "Select * from urunlistesi where (kategori=@kategori)"
End If
If aramal3.Text = "" Then
yeni1 = "Select * from urunlistesi where (kategori=@kategori) and (kategori1=@kategori1)"
End If
If aramal3.Text <> "" And aramal2.Text <> "" And aramal1.Text <> "" Then
yeni1 = "Select * from urunlistesi where (kategori=@kategori) and (kategori1=@kategori1) and (kategori2=@kategori2)"
End If
SqlDataSource1.SelectCommand = yeni1
SqlDataSource1.SelectParameters.Add("kategori", aramal1.Text)
SqlDataSource1.SelectParameters.Add("kategori1", aramal2.Text)
SqlDataSource1.SelectParameters.Add("kategori2", aramal3.Text)

Mark as me if my question or my answer can be helpful for you :)
6/26/2008 12:06:38 PM
📃 72751 articles.

💬 1 Replies

It sounds like you are are talking about situations where the first couple of apges you pull up run very slowly, then later they run much quicker.  My guess you are seeing this either on a low volume website, or one you development machine.  If the former, you can tune the site in IIS for a lower volume, which should alleivate some of this issue.  If the latter, the you can try building the site before running.
Think of it like driving a car.  When you start from a stop, or slow speed, it take a little extra effort to get going.  Once you are up to speed it is very easy to maintain that speed.  The same idea applies here.  When you first connect to a database, a connection needs to be made.  When you are done with that connection, it is kept alive for reuse later, and can be used much faster than the first time.    In terms of page caching and just-in-time compiling of aspx page, roughly the same holds true.

Failure is always an option.  Avoid situations where it is the only option.
6/27/2008 9:21:10 PM