I have an application that's been developed in MS Access, that's being accessed over the network. I'm considering to migrate the database to pgSQL and use it as back-end, and MSAccess as front-end, connecting them over ODBC.

When timing different operations, I found out that using the moveNext together with reads seriously drops performance, making the whole setup totally useless. Here's an output from the timings:

Code:
Access        MySQL         pgSQL         Function      Operation
 1.311875      1.484375      1.546        testDLookup   opens/reads
 3.858875      3.2185        3.062125     testDAvg      reads
 3.655625      2.81175       1.64025      testDMin      reads
 0.343         8.42125      17.07738      testCustMin   moveNexts/reads
 0.155625      0.280375      0.296125     testCustTrav  moveNexts
the testCustMin function contains the following:
Code:
While Not d.EOF And Not d.BOF
e = d(tc)
d.MoveNext
Wend
where d is a Recordset.

the testCustTrav function contains the following instead:
Code:
While Not d.EOF And Not d.BOF
d.MoveNext
Wend
I've been searching forums etc. for a cpl days straight without finding anything helpful. I think the problem lies somewhere between my vba code and the odbc driver. It shouldn't be anything wrong with pgSQL itself since the same problem shows for MySQL, and I don't think the problem should be in the ODBC driver since other operations (like testDMin with a lot of reads) works even better than native Access.

Does anyone have a suggestion of how to fix this problem?
I would really appriciate if someone could help out!