2 of 2 people found this helpful
In this situation I'd use a TOP. INDEX() is a table calculation, that meas it runs on top of the data loaded in a sheet. In your case, if you have many many rows returned by the database, those would all have to be transported to Tableau, loaded into a view, and only then filtered (more like hidden) to the end user. TOP on the other hand pushes the filter down to the database, it effectively will cause only the TOP N rows to be sent back to Tableau and rendered (it is, as you just, a simple SELECT TOP N).
This article might be helpful to understand where each operation happens: Tableau's Order of Operations
If you are ever curious about how long each operation is taking and where are potential bottle necks, the performance recorder is a good place to start: Record and Analyze Workbook Performance
Hope this helps!
Yep, it helped. Also, I have some filter options, using that article added them to the context and it wasn't an issue.