Lots of views vs. @Sort

Hi all!

In LN 5x an earlier versions one of way to make lookups for Dialog List fields from view is simple. Create view with sorted column. So the more Dialog List fields, the more views with sorted columns. The more views with sorted columns givs larger database.

In LN6 there is alternative solution. Make one view with lots of unsorted columns and use @Sort((@DbColumn(…)).

At first look solution with @Sort is better. Is this correct or not?

Subject: Lots of views vs. @Sort

IMHO: It depends.

Each sorted view is indexed and will therefore require minimum time to execute but the drawback is that the database will grow large.

The @Sort must execute each time the dialoglist is called and therefore it can consume much processtime and the experience to the end-user might be that they feel the application is slow/sluggish. But on the other hand - it will not require a lot of indexes and the database size can be kept at a minimum.

If the views doesn’t contain a lot of documents then I still would suggest @Sort since the difference between an indexed view and the @Sort execution time will be very small. But if the views can contain a lot of documents, then… it depends!

So - what is Your aim/goal? Minimum sized database? Then go for the @Sort. Fast responsetime for the end-user and the views contains a lot of documents? Go for indexed views.

hth

Subject: RE: Lots of views vs. @Sort

Thanks for response.

Looks like in my situation (about 5000 documents in view) @Sort is better solution.

It spends quite equal time as sorted view, but I got minimal database size.