-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: ORDER BY Parameterization
PostPosted: Fri Jun 18, 2004 5:17 pm 
Beginner
Beginner

Joined: Sun Mar 28, 2004 7:18 pm
Posts: 26
This is not a hibernate query per say, just a general SQL question, but since everyone here is dealing with SQL, I thought I'd ask it to you guys. I have 2 questions :

We cant pass in parameters to ORDER BY or GROUP BY in JDBC PreparedStatements. This leads me to believe that the SQL Compiler cannot do dynamic ordering or aggregation. Why is this ? Why cant a SQL compiler sort or aggregate dynamically ?

From what I read, the sql compiler does the sort AFTER getting the results. It does this in memory buffers, or if the buffer size is small, it spills into temp tables. What, if any, are the performance hits of doing this on the server side ?

thanks in advance...
S


Top
 Profile  
 
 Post subject: documentation
PostPosted: Fri Jun 18, 2004 5:18 pm 
Beginner
Beginner

Joined: Sun Mar 28, 2004 7:18 pm
Posts: 26
If anyone has a link that explains this in greater detail (how preparedstatements work with Sql compilers, why dynamic sorting cannot take place, etc), I would really appreciate it if you could include the link(s) in your response.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.