Home > Back-end >  Consult a ADO database of remote query problem: a SQL query with 100000 records, the result is how t
Consult a ADO database of remote query problem: a SQL query with 100000 records, the result is how t

Time:10-17

As title, a ADOQuery remote connection to a database, execute an SQL statement, the results there are 100000 records, consult everybody, in this case the client direct ADOQuery query program cannot response will happen?
And so many records to the client to change how to deal with?
Environment is a local area network (LAN), thank you very much everybody to give directions!

CodePudding user response:

Use how many record is returned, processed this paragraph continue to return to the next section, and repeat until 100000 all this over with, rather than a one-time return all records, very simple sense, is just like paging display data, assuming a screen can only display 30 rows of data, then return to article 30 data request, article 30 data under point when a page is returned, not every time request returns all data to the server, it takes the bandwidth and CPU,

CodePudding user response:

If the 100000 pairs of data to be returned immediately after processing, then use multiple threads to block the request data, as multi-threaded download file a truth,

CodePudding user response:

Thank you very much "professional quality", can you give some example code, thank you!

CodePudding user response:

Is raw ADO can be taken, as for the inside of the c + + builder ADO controls have no response overtime, best oneself use TCP transport

CodePudding user response:

Thank nextseconds, if direct use ADO I feel there will be a lot of problems

CodePudding user response:

100000 records, make sure you don't need the paging?

CodePudding user response:

Take to the client at a time in the memory,

CodePudding user response:

reference 5 floor jackyrouse reply:
thank nextseconds, I feel if direct use ADO will have a lot of problems


Using ado a return 100000 records something, I had a back three fields of sqlserver2000 article 40 w records are listed in the DBGrid, without any problems, DBGrid reaction also soon, but it's no use all take back so much

CodePudding user response:

If you can ping the server ADO abnormal, tend to have a lot of breakpoints, the solution is to extend the ADO, response time, the most fundamental is to solve this kind of network is unusual, because this time most of the CS program connection will appear problem

ADO is very perfect, SQLSERVER2000 is a classic product, just disappointing Access

CodePudding user response:

Depends on the amount of data, if a record 1 k bytes, 10 w is 100 m byte, local area net users when also can barely accept, if a record 10 k, it is 1 g bytes, single user are problematic,

CodePudding user response:

references to the tenth floor PPower response:
depends on the amount of data, if a record 1 k bytes, 10 w is 100 m byte, local area net users when also can barely accept, if a record 10 k, it is 1 g bytes, single user are problematic,


Yes, 1 k bytes is very big, probably only this article system with so many bytes

CodePudding user response:

The title of my article system in the field was set to 40 characters, the total length of the title of the commonly used the longest is 20 characters, the article content can be very long, the general is to list the title first, the user according to the title selected articles, when users want to see articles with another control performs a query to retrieve the article content,
  • Related