In fact, after a quick test with a query that was not optimized on an index, the LIMIT time took longer.
SELECT ordPK, ordFinalDisposition FROM tblOrders WHERE ordFinalDisposition='In Process' ORDER BY ordPK The above select took 0.29 seconds. The EXPLAIN indicated that it was using the WHERE, and FILESORT SELECT ordPK, ordFinalDisposition FROM tblOrders WHERE ordFinalDisposition='In Process' ORDER BY ordPK LIMIT 1 The above select took 0.77 seconds. The EXPLAIN indicated that it was using the WHERE but not the file sort. The LIMIT may have actually hurt in this instance. I'm not a MySQL performance expert though. Interesting. Nope, I didn't mean MS SQL Server. I meant any SQL Server as compared to VFP tables. MySQL, PostgreSQL, Oracle, etc. I like the backup features such as that the SQL Server can back itself up at scheduled dates and times. I like that the tables can physically reorder themselves. I like that I can modify the structures without kicking every single user off the system because there's always someone that hasn't shut down when told to do so. I figure for my sessions at FoxForward, that I'll develop my example applications using PostgreSQL because I've heard such great things about it and no one else is presenting on PostgreSQL, so I thought I'd slip it in. -Kevin CULLY Technologies, LLC Sponsor of FoxForward 2007 foxforward.net MB Software Solutions wrote: > Kevin Cully wrote: >> Look at the ROWS column when doing an EXPLAIN before your select >> statement. I believe the speed comes from matching the index(es) and >> not necessarily from the LIMIT. I may be (very) wrong though. <g> >> > Oh I agree that the speed comes from the matching indexes...for > sure...but I just thought it short-circuited after it hit the LIMIT count. > >> Nothing is going to be as fast as a SEEK, but I sure like the features >> of a SQL Server. > Specifically, what? (Did you mean MS SQL Server?) > > >> I'm very pleased with the performance of the VFP to MySQL system I'm >> developing. If I'm careful (continuous testing!), the app with scale very >> well. >> > Yep....design is the key! > _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/%(messageid)s ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

