On Apr 15, 2007, at 3:50 PM, John Siracusa wrote:

> On 4/14/07 1:16 AM, Jonathan Vanasco wrote:
>> is there a way to get Rose to search based on functions?
>>
>> ie:
>> bad
>> SELECT * FROM useraccount WHERE email = ?
>> good
>> SELECT * FROM useraccount WHERE lower(email) = lower(?)
>
> See this thread for some earlier discussion on this topic:
>
> http://www.mail-archive.com/rose-db-object@lists.sourceforge.net/ 
> msg01616.ht
> ml

Good thread.  thanks.

I'd really like to see some sort of functionality in rose for lower()  
or upper() indexes.  Using them , at least in pg, is pretty standard  
for optimizing query performance.

SELECT * FROM table WHERE email = ?
SELECT * FROM table WHERE lower(email) = ?
SELECT * FROM table WHERE email = lower(?)
vs
SELECT * FROM table WHERE lower(email) = lower(?)

is the difference beween a few milliseconds and 1 minute on one of my  
tables.

The suggested fix works, but it would be nice if something more  
standard worked too.



// Jonathan Vanasco

| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
| SyndiClick.com
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|      FindMeOn.com - The cure for Multiple Web Personality Disorder
|      Web Identity Management and 3D Social Networking
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -
|      RoadSound.com - Tools For Bands, Stuff For Fans
|      Collaborative Online Management And Syndication Tools
| - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  
- - - - - - - - - - - - - - - - - - -



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Rose-db-object mailing list
Rose-db-object@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/rose-db-object

Reply via email to