<< Click to Display Table of Contents >> Navigation: Apollo VCL Components > Optimizing Performance > Optimizing Performance under Client/Server |
When using Apollo VCL with the Apollo Database Server, there are a number of tips to keep in mind that can help insure that you get the best performance possible.
•The FetchCount property of TApolloTable and TApolloQuery can be adjusted higher on faster connections to buffer more records at a time for each call to the server for a packet of records. Reducing the FetchCount value can also result in a speed increase for unusually large record sizes (1k or greater per record) or on slower network connections.
•Apollo Database Server has been designed to take full advantage of the latest high-performance processors available, such as the new Intel Pentium III and equivalent Athlon chips from AMD – including server systems using dual processors. Your client applications will see much faster response when querying result sets from a high-end server box – running a PIII @ 500 MHz or higher with 128Mb RAM or more. These are not absolute requirements, but Apollo Database Server is designed to perform better on higher end systems.
•When doing testing where the client application and Apollo Database Server are running on the same PC, keep in mind that the same PC would be splitting its resources between the client and server processes, which will affect the overall performance. More accurate performance testing can be done when the Apollo Database Server is running on its own dedicated high-end PC with the remote client(s) connecting from other PCs.
•When using SQL SELECT statements with TApolloQuery, only request the minimal fields from the table that you actually plan to use from that query. For example, if your table contains 100 fields, but you are only looking for the first and last names of customers over 65 in California, using the following expression would not be very efficient: SELECT * FROM test WHERE (age > 50) AND (state = 'CA'). This would pull down 98 other fields that you are not planning to use. Instead, a more efficient query would be: SELECT first, last FROM test WHERE (age > 50) AND (state = 'CA').
•As in the TApolloTable.Query method, SQL queries issued with TApolloQuery are optimized on the server using all available indexes matching the fields used in the WHERE and/or ORDER BY clauses. For example, using the expression from the previous item, available individual indexes built on the AGE and/or STATE fields would have improved the speed of the query on the server.
•Only use the Apollo Database Server's Event Monitor when absolutely required for debugging purposes. This tracking and reporting of server-side events can be very resource intensive. You should leave the Event Monitor off during normal operations.
•If you are experiencing an unusually long delay in getting a response from an Apollo Database Server located on a remote Internet web server, you can use the TRACERT.EXE and PING.EXE utilities (included with Windows). These utilities will check the number of hops your connection is having to take between the client PC and the server PC, as well as the length of time it is taking to get a response.
•When connection to an Apollo Database Server on a remote Internet web server, remember that the maximum speed the communication can achieve is limited to the slowest point in the link. For example, if Apollo Database Server is running on a web server attached to a dedicated T1 line, but your client application is running on a PC using a 33k modem, then your maximum possible speed is 33k. For optimal performance, try to insure that both the server and the clients are connected to the fastest possible connections available to you.