home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 18,672 of 19,505   
   Lennart Jonsson to Erland Sommarskog   
   Re: Indexed views availible in all versi   
   18 Jun 12 12:09:48   
   
   From: erik.lennart.jonsson@gmail.com   
      
   On 06/18/2012 11:21 AM, Erland Sommarskog wrote:   
   [...]   
   > You can create indexed views in any edition of SQL Server.   
   >   
   > However, it is only in Enterprise and Developer Edition that the optimizer   
   > will consider using an indexed view in a query plan on its own initiative.   
   >   
   > If you run a query like:   
   >   
   >    SELECT * FROM myindexedview   
   >   
   > SQL Server first expands the view definition, before optimisation, and the   
   > optimiser thus have to rematch it. Which will not happen in Standard or   
   > Express Edition. However you can add a hint:   
   >   
   >    SELECT * FROM myindexedview WITH (NOEXPAND)   
   >   
   > that prevents expansion from occurring, and in this way an indxed can be   
   > utilised also in Standard and Express.   
   >   
      
   Thanks for the information Erland. Much appreciated.   
      
      
   /Lennart   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca