I have to use Indexed views to reach performance. As I can see from this comparison table standard edition does not support indexed views. But BOL says:
Indexed views can be created in any edition of SQL Server. In SQL Server Enterprise, the query optimizer automatically considers the indexed view. To use an indexed view in all other editions, the NOEXPAND table hint must be used.
So will it work (I am talking about performance)
select * from dbo.OrderTotals with (noexpand, index=IXCU_OrderTotals)
on SQL Server Standard edition as well as it works
select * from dbo.OrderTotals
on the Enterprise one?
Here is code for view:
CREATE VIEW dbo.OrderTotals
WITH SCHEMABINDING
AS
select
OrderId = r.OrderId
, TotalQty = SUM(r.Quantity)
, TotalGrossConsid = SUM(r.Price * r.Quantity)
, XCount = COUNT_BIG(*)
from dbo.Order r
group by r.OrderId
CREATE UNIQUE CLUSTERED INDEX IXCU_OrderTotals ON OrderTotals (OrderId)