add filters or manage multiple views?

Posts   
 
    
nmarun
User
Posts: 27
Joined: 31-Jul-2006
# Posted on: 18-Aug-2006 19:31:44   

Hi,

I'm having a question which poses a performance issue to me.

I have a sql view that gets joins a few tables. This view does not have any conditions ('WHERE' clause) and I add the required conditions by using IPredicateExpression filter in my code.

Is it better to add filters to a generic view or is it better to create multiple views with the 'WHERE' clause within them and then just call Fill() method of the particular typed view? (This eliminates instantiating a PredicateExpression object).

I'm not sure if there will be any difference among the two, but at least this will help me learn more about LLBLGen!

Using LLBLGen Pro 2.0 with VS.NET 2003.

Thanks Arun

bclubb
User
Posts: 934
Joined: 12-Feb-2004
# Posted on: 19-Aug-2006 02:12:33   

I don't believe there is going to be any performance difference. Since the views won't have different indexing or anything to improve performance.

I would use one view with multiple predicates. Then your logic is always in your program and not split between your views and your program.