but the best way to tell what's faster is to try both versions with your 
> data:
>

Just as additional information:

# explain analyze select trim(trailing ')' from trim(leading 'POINT(' from 
ST_AsText(geo))) from profiles;
------------------------------------------------------------------------------------------------------------------
 (rows=17420)
 Total runtime: 150.843 ms

# explain analyze select substring(ST_AsText(geo) from '^POINT\((.*)\)$') 
from profiles;
------------------------------------------------------------------------------------------------------------------
 (rows=17420)
 Total runtime: 381.579 ms

So trim is, at least in pure Postgresql, indeed more than twice as fast. I 
doubt that this tendency changes when used from within sqlalchemy.

Thanks again!

-- 
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/-/_D6p1-rUfvkJ.
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