Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> Query Hints (Option Clause)
 

Pages: 1
LLBLGen Pro Runtime Framework
Query Hints (Option Clause)
Page:1/1 

  Print all messages in this thread  
Poster Message
Angus
User



Location:
Rockford, IL
Joined on:
08-Jul-2005 21:59:38
Posted:
44 posts
# Posted on: 22-Jul-2008 21:40:35.  
Is there any way to use Query Hints with LLBLGen Pro?

For Example from BOL
Code:

USE AdventureWorks ;
GO
SELECT ProductID, OrderQty, SUM(LineTotal) AS Total
FROM Sales.SalesOrderDetail
WHERE UnitPrice < $5.00
GROUP BY ProductID, OrderQty
ORDER BY ProductID, OrderQty
OPTION (HASH GROUP, FAST 10) ; <--This is the query hint
GO


We have a DBA (Consultant) Examining our db and suggested some performance gains by using query hints.

Thanks.

-Chris
  Top
JimHugh
User



Location:
Davis, CA
Joined on:
16-Nov-2005 14:32:25
Posted:
191 posts
# Posted on: 22-Jul-2008 22:48:03.  
AFAIK, you can but is it really worth it.

One way would be to place the "optimized code" in stored procedures.

You would lose a lot of the benefits of LLBLGen, I'm thinking specifically of dynamic criteria clauses (WHERE).

The other would be create a derived DataAccessAdapter and override the ToQueryText method to modify the SQL before it gets sent to the database server.


Jim Hughes  Top
daelmo
Support Team



Location:
Guatemala City
Joined on:
28-Nov-2005 23:35:24
Posted:
8137 posts
# Posted on: 23-Jul-2008 06:54:34.  
In v2.6, the mechanism was has been a bit so people who want to add hints per table, can do so by extending the framework. This isn't as easy as adding a method somewhere, the DQE has to be adjusted so a new dbspecific creator is created which handles the hint specification. In v2.5, it's not really doable for Oracle, the mechanism wasn't that extensible as it turned out (hence the change in v2.6).

(If you needs hints for making a query perform, the query might be better of in a view. )
David Elizondo
LLBLGen'ing (articles and code snippets) | linkedin | twitter
 
Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.