[SQL] Efficiency Problem

2013-03-17 Thread Surfing
Hi all, I'm composing a query from a web application of type: *SELECT * FROM table WHERE a_text_field LIKE replace_something ('%**/a_given_string/**%');* The function replace_something( ... ) is a stored procedure that replaces some particular characters with others. The problem is that I

Re: [SQL] Efficiency Problem

2013-03-17 Thread Misa Simic
Hi, 1) Is function marked as immutable? 2) if immutable doesnt help... It should be possible execute it first, and use it in other dynamics things in where... Cheers, Misa Sent from my Windows Phone -- From: Surfing Sent: 17/03/2013 12:16 To: pgsql-sql@postgresql.or

Re: [SQL] Efficiency Problem

2013-03-17 Thread Surfing
IMMUTABLE solved the problem. Thank you! Il 17/03/2013 12.39, Misa Simic ha scritto: Hi, 1) Is function marked as immutable? 2) if immutable doesnt help... It should be possible execute it first, and use it in other dynamics things in where... Cheers, Misa Sent from my Windows Phone