Gliderecord and GlideAggregate

Abhinab Achary1
Tera Guru

Hi All,

I have a query.

currently in our system we have gliderecord in script which basically counts using getrowcount and also deletes junk records .

We want to usse glideagrregate to count, so this entire functionality using glideagrregate can this be achieved?

Thanks,

Abhinab

1 ACCEPTED SOLUTION

If you are deleting records, then there is no performance gained by using GlideAggregate. They are going to do the same thing in the end. The only performance gained is using GlideAggregate's count over GlideRecord's getRowCount() for simply count operations.



My recommendation is to use GlideRecord, getRowCount() to count the records and deleteRecord() to delete them in the same server side script. If you use GlideAggregate with deleteRecord(), you're going to confuse someone somewhere.


View solution in original post

16 REPLIES 16

Abhinab Achary1
Tera Guru

My goal is to improve performance and keeping in mind upgradeability


If you are deleting records, then there is no performance gained by using GlideAggregate. They are going to do the same thing in the end. The only performance gained is using GlideAggregate's count over GlideRecord's getRowCount() for simply count operations.



My recommendation is to use GlideRecord, getRowCount() to count the records and deleteRecord() to delete them in the same server side script. If you use GlideAggregate with deleteRecord(), you're going to confuse someone somewhere.