Thanks for all the answers and tips. I was very busy yesterday. Today is such a nice weather and I will take the day off to go wakeboarding.
I will test everything and come back.
Olaf, I already use activeVFP for serving data to our Android devices. So that would also be an option.
And of...
I use VFP 9 SP2.
Field Invoicenr is in both tables char and 9 long. I didn't know that it would matter. In my testdatabase I changed it to Integer and the query is inner join and left join now about 1 second. So it is a lot faster.
But unfortunately I cannot change the field types in the real...
I don't have an index on DELETED().
I only have two tables with each 2 fields:
table Invoices: fields: invoicenr, customernr Index: invoicenr
table invoice_details: fields: invoicnr, artnr Index: invoicenr, artnr
I tried to reduce the foreground/background, but still the same.
Because both tables have a large number of fields, I created 2 new tables with only the 2 neccessary fields. I then filled them with the data from the original tables. It is a bit faster, but not more than 10%.
SYS(3054,11,"cmemvar"):
Using index tag Artnr to rushmore optimize table d
Rushmore...
Thanks for the answers.
@OlafDoschke:
You are right that a left join is not what I want, but an inner join was about 1 second slower.
The query is executed directly in foxpro and the time is what foxpro presents to me: "xxxx records selected in x.xx seconds".
Here is the output you asked for...
Hello,
I have 2 tables: invoices (1M records) and invoice_details (5M records)
I want to select all invoices which containe artiklenr "1234":
SELECT customernr from invoice_details d left join invoices i on i.invoicenr = d.invoicenr where artnr = 1234
This query takes about 3 seconds on a...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.