Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone,
I did a test and I stumbled upon that drop field can also drop several fields. So my question is, what is really the difference between the 'drop field' and 'drop fields'?
Thanks.
You may spell it "field" or "fields" whether dropping one or many fields.
If you are dropping multiple fields, there is a significant performance difference between using one DROP statement vs multiple DROP statements that drop one field each.
DROP FIELD a,b,c;
is faster than
DROP FIELD a;
DROP FIELD b;
DROP FIELD c;
The reason is that QV rewrites the records array after every DROP statement, which can take a few seconds in a large table. This may be less of an issue in QV12, haven't benchmarked it.
-Rob
You can write also in single statement which is fastest as ROB suggested
DROP FIELDS a,b,c;
So basically it is the same with 'drop field' and 'drop fields' when you're dropping several fields?
Yes, you can spell it either way and it works exactly the same.
-Rob