I want some high cost sql queries and low cost sql quries
hi i want some sql quries like bellow type (no matter how much the query is lengthy)(this query was against northwind database of the sql server)
select OrderID, Customerid, sum(freight)from orders group by orderid,customerid having sum(freight)> (select avg(freight) from orders)
what i want is ,i want two sql queries to retrieve same data(ie for both queries the output is same)
but for first query the time taken(cost) to retrieve the data should be more than the second query
can anyone give me some example queries on this