Re: [sqlalchemy] .any() queries and MySQL performance

2015-06-11 Thread Eric Ogren
On Wednesday, June 10, 2015 at 9:00:13 PM UTC-7, Michael Bayer wrote: On 6/10/15 10:32 PM, Eric Ogren wrote: Hello, snip Is there a good way to leverage the .any() filter in MySQL? I can sort of work around this by doing something like:

[sqlalchemy] What is the terminology for ...?

2015-06-11 Thread Tony C
Hi I'm new to databases, SQL, and SQLAlchemy. I've been going through the tutorials and docs at SQLAlchemy.org trying to find a solution to what I believe is a very simple issue with database quiries, however I'm quite uncertain of the terminology. I'm using the declarative form of SQL

[sqlalchemy] What is the SQLAlchemy terminology for ..?

2015-06-11 Thread Tony C
Hi I'm new to databases, SQL, and SQLAlchemy. I've been going through the tutorials and docs at SQLAlchemy.org trying to find a solution to what I believe is a very simple issue with database quiries, however I'm quite uncertain of the terminology. I'm using the declarative form of SQL

[sqlalchemy] Re: What is the SQLAlchemy terminology for ..?

2015-06-11 Thread Jonathan Vanasco
Your question and example are both a bit confusing. I'll try to impart some knowledge that can help you re-focus an ask. 1. In your example, `Session.query(CaseTestInstance)` will return all the data in the `cases_test_instance` table. 2. Recursive Queries can mean a few things (and is often

Re: [sqlalchemy] What is the terminology for ...?

2015-06-11 Thread David Allouche
On 11 Jun 2015, at 19:09, Tony C cappy2...@gmail.com wrote: I'm new to databases, SQL, and SQLAlchemy. I've been going through the tutorials and docs at SQLAlchemy.org trying to find a solution to what I believe is a very simple issue with database quiries, however I'm quite uncertain of

[sqlalchemy] Re: What is the SQLAlchemy terminology for ..?

2015-06-11 Thread Tony C
Thanks Jonathan, Your question and example are both a bit confusing Yes-as I mentioned in my post, and I am new to databases and SQL,so I don't know how to ask for what I'm looking for. After creating the relationship that you mentioned, my queries now pull the data from the referenced tables.

Re: [sqlalchemy] What is the terminology for ...?

2015-06-11 Thread Tony C
Thanks David On Thursday, June 11, 2015 at 11:53:44 AM UTC-7, David Allouche wrote: On 11 Jun 2015, at 19:09, Tony C capp...@gmail.com javascript: wrote: I'm new to databases, SQL, and SQLAlchemy. I've been going through the tutorials and docs at SQLAlchemy.org trying to find a solution to

[sqlalchemy] Re: .any() queries and MySQL performance

2015-06-11 Thread Jonathan Vanasco
FWIW, the first thing I noticed is that this will rarely work well, as the index is on a 255length column. if your table is big, you would definitely see a large improvement by storing a 32char md5 version of that column, creating a partial index on the first 5-8 characters, and then adding a