Hallo,
ich habe in einer VB.Net Anwendung ein DataGridView, das mit einer SQL-Union Abfrage wie folgt gefüllt wird:
Die Abfrage dauert so etwa 30 Sekunden und ist in der Form nicht zu handeln. Habt ihr eine Idee wie man das effizienter machen kann???
Gruß
tompkins
ich habe in einer VB.Net Anwendung ein DataGridView, das mit einer SQL-Union Abfrage wie folgt gefüllt wird:
VB.NET-Quellcode
- dim cnn As OleDbConnectioncnn = New OleDbConnection(<OLEDBConnecrtion>)
- Dim da As OleDbDataAdapter
- Dim ds As New DataSet
- Dim sSQL As String
- cnn.Open()
- sSQL = "SELECT top 100 A.time , A.value, B.value, C.value , D.value " & _
- "FROM archive A INNER JOIN archive B ON A.time = B.time INNER JOIN archive C ON A.time = C.time INNER JOIN archive D ON A.time = D.time " & _
- "WHERE A.tag=<tag1> AND B.tag=<tag2> AND C.tag=<tag3> AND D.tag=<tag4> ORDER BY A.time desc"
- da = New OleDbDataAdapter(sSQL, cnn)
- da.Fill(ds, "Table1")
- Me.DataGrid.DataSource = ds
- Me.DataGrid.DataMember = "Table1"
Die Abfrage dauert so etwa 30 Sekunden und ist in der Form nicht zu handeln. Habt ihr eine Idee wie man das effizienter machen kann???
Gruß
tompkins