General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
Title:
Create SQL VIEW REMOTE (gets all records!)
To create a view of a subset of remote data stored on a Linux server using MySQL, I use the following VFP 7 sample command:
OPEN DATABASE MyData
CREATE SQL VIEW MyView REMOTE CONNECTION MyRemote as ;
SELECT title FROM titles WHERE title=?xTitle Limit 10
(FYI the titles table has 1.5 million records and lots of fields)
The system then stalls (waits)...
When I examine a server process list (using the tool in MySQLFront), the server is busy processing the folling request:
SELECT * FROM titles <--- Yikes!
Obviously, this step is going to take a while to download this HUGE file. My question is why does VFP need to get all the records in the table when I am only CREATING the view? Is it the fact that "Limit 10" is not native to VFP? I can't use "TOP 10" because MySQL does not understand that. None of that should matter anyway because the first command VFP sends (by itself) is "SELECT * FROM titles"
I am wondering if VFP and MySQL are not compatible in some way (can anyone verify this situation on their system?). I have tried to solve this for months, and it seems odd that I am the only one out there who seems to be having an issue with such a basic operation. Help!
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only