getDataSetByQuery or addFoundSetFilterParam

Hi,

What are the pros and cons to filter and calculate data using:
getDataSetByQuery
or
addFoundSetFilterParam

I made an SQL query statement whit a Group By using getDataSetByQuery
to get and group my data. It works fine but my concern is, how dose my Statement performs or run for example on an Oracle Database.
Do I might face some problems changing Database?
Or is it recommended to use the addFoundSetFilterParam together whit Calculations and Aggregations to Filter Data group.

Regards
ttmgybta

With getDataSetByQuery, you will have to write a database specific SQL statement. If you move to another database, your statement might need some work.
The benefit of this approach is that you can create queries spanning multiple tables in a relatively simple query.
To emulate that using foundsets and filters, it might require more coding. The benefits of that approach is that Servoy will cache your query results so if you use the same queries repeatedly, it might perform better.

It all depends on your use case.