Re: using SQLserver, ADO, Delphi: performance issue
From: David Gugick (davidg-nospam_at_imceda.com)
Date: 01/12/05
- Next message: David Gugick: "Re: which statement fire the trigger ?"
- Previous message: Allan Mitchell: "Re: DTS Import Package"
- In reply to: Joe Hatem: "using SQLserver, ADO, Delphi: performance issue"
- Next in thread: Joe Hatem: "Re: using SQLserver, ADO, Delphi: performance issue"
- Reply: Joe Hatem: "Re: using SQLserver, ADO, Delphi: performance issue"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 12 Jan 2005 01:42:10 -0500
Joe Hatem wrote:
> We have been considering using SQLserver as the backend for a large
> business application developed in Delphi.
> We intelinked an ADOconnection, an ADOtable and a DBgrid.
> The table is about 200,000 records.
>
> No matter what options we enabled or disabled on the ADOconnection or
> the ADOtable, the MSsql Profiler shows that the client end is fetching
> all the 200,000 records, and then showing only the required screenful
> of 20 records or so.
> When the requested display is not indexed, we see the first 20 records
> at once, but the client keeps fetching records, until all are
> transferred.
> When the requested display is indexed, we get no display until all
> records have been fetched,
>
> We cannot believe that this is the modus operandi of ADO, we must be
> missing something fundamental.
> Any suggestion ?
I agree with Aaron that you want to do paging. ADO is not the root
cause. Your code is (or the Delphi control is). ADO supports server-side
(standard) read-only, forward-only result sets. These result sets are
only fetched when you request a fetch operation. Even in that case,
however, you would likely want to fetch everything as quickly as
possible. Until you do, the ADO connection cannot execute anything else
and you are going to leave shared locks on the server on some of the
unfetched pages. You may be using a client-side cursor. In this case,
ADO is fetching the rows behind the scenes for you. This is a better
option when you have to perform a lot of row processing and think moving
through the results is going to take some time. I don't know what an ADO
Table is. Is that a Dephi object? You'll probably want to use an ADO
recordset with the proper parameters. Moving 200,000 rows across the
network is not ideal. I strongly suggest looking into a paged solution
or make the user query a subset of data first to reduce the result set
load.
-- David Gugick Imceda Software www.imceda.com
- Next message: David Gugick: "Re: which statement fire the trigger ?"
- Previous message: Allan Mitchell: "Re: DTS Import Package"
- In reply to: Joe Hatem: "using SQLserver, ADO, Delphi: performance issue"
- Next in thread: Joe Hatem: "Re: using SQLserver, ADO, Delphi: performance issue"
- Reply: Joe Hatem: "Re: using SQLserver, ADO, Delphi: performance issue"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|