>How the cursor with PKs is created? Is it a separate select?
This comes from a PHDBase query. So, at minimum, I start with a cursor which contains all the primary keys found. That is on the secondary server. In order to achieve maximum performance, I need to INNER JOIN that with the main table which resides on another server. So, this is why I had to change that approach. Before, all the process was done on the same server so it was not a concern. It was VFP regular SQL all the way. Now, I have to use a client server approach.