Re: Remote view creation very slow with MySQL

Author: Paul McNett

Posted: 2009-02-03 at 12:17:14

Gianni Turri wrote:

> Hi all!

>

> Creating a remote view connected to MySQL data take a very long time to complete,

> as if the code to create the view is actually causing a SELECT to be performed on the MySQL backend database.

>

> Sample code:

>

> create sql view "MyView" remote connection "MySqlConnection" as ;

> select * ;

> from MyTable ;

> where MyCode = ?vp_code

>

> The creation of the remote view takes a long time and the amount of time it takes

> seems to be proportional to the amount of data in the backend table.

>

> The same operations connecting to MS-SQL data are almost istantaneous.

>

> Anyway, once created, these views work as they should.

>

> Anyway SPT access to MySQL data is fast.

>

> All tests are done locally.

>

> Does this behavior sound familliar to anyone?

> Does anyone have any suggestions?

Yes, I remember having similar problems. Check the log on the server to see the

queries being sent. Because of multiple problems with remote views (and local views)

in VFP, I went with a 100% SPT solution. You can easily make SPT cursors updateable,

getting you everything a remote view gives you. See:

ftp://leafe.com/makeupdatable.prg

Paul

©2009 Paul McNett