Am Montag, den 06.11.2006, 16:15 +0000 schrieb Dennis:
> > SELECT clients.name AS clients_name, clients.contact AS clients_contact,
> > clients.email AS clients_email, clients.id_client AS clients_id_client
> > FROM clients
> > WHERE clients.name LIKE %s OR clients.contact LIKE %s OR clients.email
> > LIKE %s ORDER BY clients.name
> > ['%bla%', '%bla%', '%bla%']


> If you were to take that approach though.. the sql that is generated
> would be the same as what you already came up with.

Yes, but that does not matter.  Be sure to have an Index for all three
Columns created, somewhere after table creation:

index = Index("indexname", 
              model.Client.c.name, 
              model.Client.c.contact, 
              model.Client.c.email)

Or do that with your database client afterwards...

The SQL Statement should be compiled by the sql server itselfe, so it
should have good performance.


- Martin


--~--~---------~--~----~------------~-------~--~----~
 You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to