Hi all,
I've developed an app (C#) that connects to SQL Server 2000 without using
thread pooling (using SqlConnection) and I run a query that returns ~4000
tuples each time it runs and displays the results in a listview. The problem
is that after I run it 3-4 times the results are read very slowly from the
DB. The first times the results are displayed in 1-2 secs but the 4,5 time
it takes more than 2 minutes! What am I doing wrong? Are there any
in-between buffers that need to be emptied?
Thanks,
-peter 6 1366
Hi Peter,
If you could show us some code we might be able to make a better
diagnosis.
This is a windows forms application?
Any chance you are appending the results from the second query to the
listbox without clearning the list box first?
--
Scott http://www.OdeToCode.com
On Sun, 8 Aug 2004 13:14:04 +0300, "pnp" <pnp.at.softlab.ece.ntua.gr>
wrote: Hi all, I've developed an app (C#) that connects to SQL Server 2000 without using thread pooling (using SqlConnection) and I run a query that returns ~4000 tuples each time it runs and displays the results in a listview. The problem is that after I run it 3-4 times the results are read very slowly from the DB. The first times the results are displayed in 1-2 secs but the 4,5 time it takes more than 2 minutes! What am I doing wrong? Are there any in-between buffers that need to be emptied?
Thanks, -peter
The results are displayed in a listview and its' items are always cleared
before putting in the new ones...
"Scott Allen" <bitmask@[nospam].fred.net> wrote in message
news:ll********************************@4ax.com... Hi Peter,
If you could show us some code we might be able to make a better diagnosis.
This is a windows forms application?
Any chance you are appending the results from the second query to the listbox without clearning the list box first?
-- Scott http://www.OdeToCode.com
On Sun, 8 Aug 2004 13:14:04 +0300, "pnp" <pnp.at.softlab.ece.ntua.gr> wrote:
Hi all, I've developed an app (C#) that connects to SQL Server 2000 without using thread pooling (using SqlConnection) and I run a query that returns ~4000 tuples each time it runs and displays the results in a listview. The
problemis that after I run it 3-4 times the results are read very slowly from
theDB. The first times the results are displayed in 1-2 secs but the 4,5
timeit takes more than 2 minutes! What am I doing wrong? Are there any in-between buffers that need to be emptied?
Thanks, -peter
Start by using Profiler to see if you get the same execution plan between the executions. Depending on whether
you do or not, you can determine whether this is a SQL Server issue or a client app issue.
--
Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/
"pnp" <pnp.at.softlab.ece.ntua.gr> wrote in message news:Oi**************@TK2MSFTNGP10.phx.gbl... Hi all, I've developed an app (C#) that connects to SQL Server 2000 without using thread pooling (using SqlConnection) and I run a query that returns ~4000 tuples each time it runs and displays the results in a listview. The problem is that after I run it 3-4 times the results are read very slowly from the DB. The first times the results are displayed in 1-2 secs but the 4,5 time it takes more than 2 minutes! What am I doing wrong? Are there any in-between buffers that need to be emptied?
Thanks, -peter
well i checked it with the profiler and while the SQL:BatchCompleted takes
about the same amount of time for each execution (~2200) the Audit Logout is
different and when the program slows down it takes numbers up to ~584263
while a normal execution takes up to ~20296.
What does this mean?
"Tibor Karaszi" <ti***************************@hotmail.nomail.co m> wrote in
message news:%2***************@TK2MSFTNGP10.phx.gbl... Start by using Profiler to see if you get the same execution plan between
the executions. Depending on whether you do or not, you can determine whether this is a SQL Server issue or a
client app issue. -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/
"pnp" <pnp.at.softlab.ece.ntua.gr> wrote in message
news:Oi**************@TK2MSFTNGP10.phx.gbl... Hi all, I've developed an app (C#) that connects to SQL Server 2000 without
using thread pooling (using SqlConnection) and I run a query that returns
~4000 tuples each time it runs and displays the results in a listview. The
problem is that after I run it 3-4 times the results are read very slowly from
the DB. The first times the results are displayed in 1-2 secs but the 4,5
time it takes more than 2 minutes! What am I doing wrong? Are there any in-between buffers that need to be emptied?
Thanks, -peter
If you check Books Online, you will find following for the "Audit Logout" event:
Duration The approximate amount of time since the user logged in.
But the SQL:BatchCompleted are the same, so this indicates that the query executes in the same time, the added
time for the logout is the time for the client to process the results before it can logout from the SQL
Server.
I.e., the problem is with the client app (at least as far as I can see). You might want to post this (with
appropriate details) to an ADO.NET group...
--
Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/
"pnp" <pnp.at.softlab.ece.ntua.gr> wrote in message news:%2****************@tk2msftngp13.phx.gbl... well i checked it with the profiler and while the SQL:BatchCompleted takes about the same amount of time for each execution (~2200) the Audit Logout is different and when the program slows down it takes numbers up to ~584263 while a normal execution takes up to ~20296.
What does this mean?
"Tibor Karaszi" <ti***************************@hotmail.nomail.co m> wrote in message news:%2***************@TK2MSFTNGP10.phx.gbl... Start by using Profiler to see if you get the same execution plan between the executions. Depending on whether you do or not, you can determine whether this is a SQL Server issue or a client app issue. -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/
"pnp" <pnp.at.softlab.ece.ntua.gr> wrote in message
news:Oi**************@TK2MSFTNGP10.phx.gbl... Hi all, I've developed an app (C#) that connects to SQL Server 2000 without using thread pooling (using SqlConnection) and I run a query that returns ~4000 tuples each time it runs and displays the results in a listview. The problem is that after I run it 3-4 times the results are read very slowly from the DB. The first times the results are displayed in 1-2 secs but the 4,5 time it takes more than 2 minutes! What am I doing wrong? Are there any in-between buffers that need to be emptied?
Thanks, -peter
I'll try to post it there... Thanks anyway.
"Tibor Karaszi" <ti***************************@hotmail.nomail.co m> wrote in
message news:up*************@TK2MSFTNGP09.phx.gbl... If you check Books Online, you will find following for the "Audit Logout"
event: Duration The approximate amount of time since the user logged in.
But the SQL:BatchCompleted are the same, so this indicates that the query
executes in the same time, the added time for the logout is the time for the client to process the results
before it can logout from the SQL Server.
I.e., the problem is with the client app (at least as far as I can see).
You might want to post this (with appropriate details) to an ADO.NET group...
-- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/
"pnp" <pnp.at.softlab.ece.ntua.gr> wrote in message
news:%2****************@tk2msftngp13.phx.gbl... well i checked it with the profiler and while the SQL:BatchCompleted
takes about the same amount of time for each execution (~2200) the Audit
Logout is different and when the program slows down it takes numbers up to ~584263 while a normal execution takes up to ~20296.
What does this mean?
"Tibor Karaszi" <ti***************************@hotmail.nomail.co m> wrote
in message news:%2***************@TK2MSFTNGP10.phx.gbl... Start by using Profiler to see if you get the same execution plan
between the executions. Depending on whether you do or not, you can determine whether this is a SQL Server issue or
a client app issue. -- Tibor Karaszi, SQL Server MVP http://www.karaszi.com/sqlserver/default.asp http://www.solidqualitylearning.com/
"pnp" <pnp.at.softlab.ece.ntua.gr> wrote in message
news:Oi**************@TK2MSFTNGP10.phx.gbl... > Hi all, > I've developed an app (C#) that connects to SQL Server 2000 without using > thread pooling (using SqlConnection) and I run a query that returns ~4000 > tuples each time it runs and displays the results in a listview. The problem > is that after I run it 3-4 times the results are read very slowly
from the > DB. The first times the results are displayed in 1-2 secs but the
4,5 time > it takes more than 2 minutes! What am I doing wrong? Are there any > in-between buffers that need to be emptied? > > Thanks, > -peter > >
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Guy Erez |
last post by:
Hi,
I'm running queries with MySql 4.0.17 that return thousands of
records. Because I need to present them in GUI, I returieve the
results in chunks using LIMIT, for example - get first 100,...
|
by: Guy Erez |
last post by:
Hi,
I'm running queries with MySql 4.0.17 that return thousands of
records. Because I need to present them in GUI, I returieve the
results in chunks using LIMIT, for example - get first 100,...
|
by: Rick Caborn |
last post by:
Does anyone know of a way to execute sql code from a dynamically built
text field?
Before beginning, let me state that I know this db architecture is
built solely for frustration and I hope to...
|
by: Daz |
last post by:
Hi everyone.
I was faced with the choice of whether my problem is indeed a PHP
problem or a MySQL. I have decided it's a PHP problem as I don't
experience the same problem when I execute the...
|
by: tekctrl |
last post by:
Anyone:
I have a simple MSAccess DB which was created from an old ASCII flatfile.
It works fine except for something that just started happening. I'll enter
info in a record, save the record,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
| |