Mike Yearwood
Toronto, Ontario, Canada
Information générale
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
>I am in a situation where I'm supporting a 3rd party product that has been modified by our company using strictly procedural code. Originally written in VFP6.0, we are attempting to port to VFP9.0 (but that's another story).
>I have to convince the IT director/coder and the CFO why it's better to use SQL-Select than the procedural code and why it's a bad thing to have over 2 million records in a file. The Select statement takes a much longer time to run than Seek ... Do While.. How can I present this to non-technical people?
It's not bad to have 2 million records in a table. I don't envy you having to try to convince an "IT director"/"coder" of anything. People that are used to using SEEK and DO WHILE often do not know how to squeeze performance out of Rushmore, especially with multi-million record tables. Further, such systems tend to be remote backend hostile. They assume all records are already available, where in remote backends the assumption has to be you get no records until you specify which ones.
The advantages of using SQL lies in the flexibility to provide the user with more search control. If the users want to search for invoices entered sometime last week for a guy with the firstname contains "Ji" ordered by date descending and invoice number ascending, that cannot easily be done with seek/do while code. First they'd have to have a multitude of indexes that anticipate (read LIMIT!!!) the user's searches. Once the users are used to doing things a certain way, they'll not care to back you up either.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement