I am not very opinionated on the details of the syntax. On comments vs new keywords the arguments I can think of are:
Pros of using comments:- - sql can be portable to other databases - sql can be portable between h2 versions (previous, and future versions that may deprecate hints) - subjective aesthetic things, sql remains purely logical and adding annotations possibly should feel different to writing the sql. Cons:- - have to parse comments - possibly comments exist with accidental hints - cannot validate annotations since noise could just be a comment - does not fit in with current documentation system - subjective aesthetic things Anyway, I think it would be good to make a decision as to the direction h2 will take. I suppose a third way would be to have an annotations syntax (a bit like in java). I think aesthetically that might be the most pleasing ... - mike On Thu, Mar 12, 2015 at 6:17 AM, Noel Grandin <[email protected]> wrote: > > > On 2015-03-12 01:50 AM, Mike Goodwin wrote: > >> So aside from improving the optimizer what would fix my problem would be >> the ability to add hints to fix the join >> ordering. I know this is on the road map and I wouldn't mind doing it and >> do not think it should be too hard to >> implement (it amounts to adding something to pick up hints in the parser >> then disabling the optimizer). Has any thought >> been been put into what the hint syntax for this would look like? >> >> Oracle uses >> SELECT /*+ORDERED */ ... >> >> Sql Server Uses >> SELECT >> ... >> OPTION(FORCEORDER) >> >> Postrges uses (this seems less flexible, as it is per query not per >> select): >> join_collapse_limit (1) >> SELECT ... >> >> > I think the SQL Server syntax is better than the Oracle syntax - I don't > like hiding syntax in comments. > > In this case I think we'd be free to make up our own syntax. > > > -- > You received this message because you are subscribed to the Google Groups > "H2 Database" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/h2-database. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/h2-database. For more options, visit https://groups.google.com/d/optout.
