It;s not easy to answer such a topic since there is not enough information about your database, DF setup, foreign keys, virtual keys etc. I advice you to enable mysql query logs and perform api request and ci request to see differences between SQL queries. For example DF may be using virtual foreign keys, not optimized/indexed fields to seek data etc. If the queries are exactly the same, look for the previous queries DF is performing and be sure that caching is not affecting the results (perform requests in between stopping/starting mysql service) etc.
Related Topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
Using sql "related" queries seems very slow | 3 | 2002 | July 28, 2016 | |
Very poor performance with many to many sql relations | 4 | 2377 | November 3, 2016 | |
What is the quickest way to import thounsand records to a table? | 5 | 3087 | April 11, 2016 | |
Changing max_records_returned doesn't have any effect on returned data | 1 | 2176 | January 4, 2016 | |
OData output from the DB call | 5 | 4532 | September 9, 2016 |