Le mercredi 4 avril 2012 16:27:39 UTC+2, Michael Bayer a écrit :
>
> this all comes down to the nature of the SQL being emitted.
>
> what is the SQL being emitted by SQLAlchemy in this case, and what is the 
> SQL that should be emitted ?  Working with SQLAlchemy in a non-trivial way 
> implies you're using echo=True or otherwise logging queries during 
> development, and are watching what it does at every step - this is how you 
> tune your app essentially.
>
That's exactly what I did : activate "echo" to get SQL code in a console, 
and then copy it "as is" in Tora's SQL worksheet.
The only difference for me (beyond response delay !) is that SQLAlchemy 
seems to use prepared statements with query parameters, while Tora 
doesn't...

 

> The ORM is pretty open ended as to how the ultimate SQL query can be 
> structured.  You'd want to identify exactly how the structure needs to be 
> in raw SQL, then make sure the ORM query is structured in the same way.
>
> If there's truly some odd artifact about the indexable SQL that the ORM 
> just won't do, we can look into using literal expressions for parts of the 
> query, though typically the Oracle indexing quirks are over things like 
> which table comes first in the FROM list or what kinds of comparisons are 
> being used between values, these things can be controlled.
>
I tried to use "+rule" and/or "+index" hints for Oracle, but it seems that 
recent Oracle releases doesn't even use them...
My SQLAlchemy queries are actually really simple and doesn't use any 
complex structure or even relation.

Thanks for any help or advise,
Thierry

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/sqlalchemy/-/8w0ZGwHXtLcJ.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to