Indexed Views

Posts   
 
    
Maxus
User
Posts: 76
Joined: 04-Aug-2006
# Posted on: 04-Sep-2007 10:13:57   

Hi People,

I was just quickly having a play with indexed views on SQL server 2005 standard edition, I discovered LLBLGEN doesn't seem to have a way to provide the NOEXPAND keyword so the engine knows to use the view's indexes, After searching on the forum I discovered this post:

http://www.llblgen.com/tinyforum/Messages.aspx?ThreadID=4828&HighLight=1

As the post is oldish, I was wondering if there have been any recent changes that could allow you to specify the NOEXPAND option? or if there is a modification I can do to be able to do it?

Thanks! Alex

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 04-Sep-2007 10:40:27   

Frans explained the modifications to be done. Still it can be messy. In this case I recommend using a Stored Procedure.

Maxus
User
Posts: 76
Joined: 04-Aug-2006
# Posted on: 04-Sep-2007 10:57:02   

Hi Walaa,

Thanks for the reply, sadly this it would be far too complex to do this in a stored procedure, Its the main table of the application and clients need to be able to do adhoc queries against it, I would have to used some dynamic SQL for the select statements inside the stored procedure and I don’t like the idea of that simple_smile . Will it be a future version addition?

Thanks A

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39910
Joined: 17-Aug-2003
# Posted on: 04-Sep-2007 16:15:26   

table hints is a problem at the moment indeed. The specification for table hints (this is also a table hint, similar to NOLOCK etc.) is not really doable within a set of query parameters passed to a fetch method like predicateexpression, relations etc. so it's better specified as a set of hints to the dataaccessadapter or daobase class.

We'll consider something in the future.

Frans Bouma | Lead developer LLBLGen Pro
Maxus
User
Posts: 76
Joined: 04-Aug-2006
# Posted on: 05-Sep-2007 02:46:58   

Thanks Otis.