Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
julioarriaga
Creator II
Creator II

After a test, 'drop field' can drop several fields, what is really the difference vs 'drop fields'?

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.

Capture1.PNG

1 Solution

Accepted Solutions
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Yes, you can spell it either way and it works exactly the same.

-Rob

View solution in original post

4 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

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

http://masterssummit.com

http://qlikviewcookbook.com

its_anandrjs

You can write also in single statement which is fastest as ROB suggested

DROP FIELDS a,b,c;



julioarriaga
Creator II
Creator II
Author

So basically it is the same with 'drop field' and 'drop fields' when you're dropping several fields?

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Yes, you can spell it either way and it works exactly the same.

-Rob