<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Caution when using PL/SQL functions in a SQL statement</title>
	<atom:link href="http://www.inside-oracle-apex.com/caution-when-using-plsql-functions-in-sql-statement/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.inside-oracle-apex.com/caution-when-using-plsql-functions-in-sql-statement/</link>
	<description>Inside Oracle APEX - a blog that helps to get more out of Oracle Application Express (APEX) for your daily development work!</description>
	<lastBuildDate>Mon, 19 Dec 2011 12:04:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: rahul bhandari</title>
		<link>http://www.inside-oracle-apex.com/caution-when-using-plsql-functions-in-sql-statement/comment-page-1/#comment-12286</link>
		<dc:creator>rahul bhandari</dc:creator>
		<pubDate>Mon, 31 Aug 2009 11:32:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.inside-oracle-apex.com/en/?p=12#comment-12286</guid>
		<description>Hi,
I am new to Oracle Appex,
i would like to know validation of any String with Regualr Expression option  [a-z,A-Z ]+. Only this character alows, When i m trying to use above pattern.its not working .
Can u tell me the ways to do validation
1) Using SQL expression, i can validate or not???
2) Using pl/SQL expression, i can validate or not???
3) Regular Expression, i can validate or not or not???

Test Case ::
1) efraer345   should be failed
2)2342er should be failed
3) #$%#$%sdfas34 should be failed
4)rahul bhandari should be pass
5) dfsd_` should be failed</description>
		<content:encoded><![CDATA[<p>Hi,<br />
I am new to Oracle Appex,<br />
i would like to know validation of any String with Regualr Expression option  [a-z,A-Z ]+. Only this character alows, When i m trying to use above pattern.its not working .<br />
Can u tell me the ways to do validation<br />
1) Using SQL expression, i can validate or not???<br />
2) Using pl/SQL expression, i can validate or not???<br />
3) Regular Expression, i can validate or not or not???</p>
<p>Test Case ::<br />
1) efraer345   should be failed<br />
2)2342er should be failed<br />
3) #$%#$%sdfas34 should be failed<br />
4)rahul bhandari should be pass<br />
5) dfsd_` should be failed</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Edgar</title>
		<link>http://www.inside-oracle-apex.com/caution-when-using-plsql-functions-in-sql-statement/comment-page-1/#comment-10884</link>
		<dc:creator>Edgar</dc:creator>
		<pubDate>Mon, 10 Aug 2009 03:05:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.inside-oracle-apex.com/en/?p=12#comment-10884</guid>
		<description>Hi I want to learn about ORACLE and to be a software developer in near future right now in studying ORACLE, but my professor in ORACLE is a very low to taech and actually my co-classmate hey said she is not a good professor, so if there is someone to teach me a good samaritan, Im willing and eager to learn ORACLE software and not also a developer, I want a beyond a developer. Im Accounting graduate, not working a job seeker, and willing to learn more about IT. Thanks.</description>
		<content:encoded><![CDATA[<p>Hi I want to learn about ORACLE and to be a software developer in near future right now in studying ORACLE, but my professor in ORACLE is a very low to taech and actually my co-classmate hey said she is not a good professor, so if there is someone to teach me a good samaritan, Im willing and eager to learn ORACLE software and not also a developer, I want a beyond a developer. Im Accounting graduate, not working a job seeker, and willing to learn more about IT. Thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ApEx Developer</title>
		<link>http://www.inside-oracle-apex.com/caution-when-using-plsql-functions-in-sql-statement/comment-page-1/#comment-2839</link>
		<dc:creator>ApEx Developer</dc:creator>
		<pubDate>Thu, 19 Mar 2009 18:13:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.inside-oracle-apex.com/en/?p=12#comment-2839</guid>
		<description>Patrick,

BTW, your own previous article describes the very similar issue:

http://www.inside-oracle-apex.com/sql-embedded-into-plsql/

;)

WBR, Yuri</description>
		<content:encoded><![CDATA[<p>Patrick,</p>
<p>BTW, your own previous article describes the very similar issue:</p>
<p><a href="http://www.inside-oracle-apex.com/sql-embedded-into-plsql/" rel="nofollow" class="liinternal">http://www.inside-oracle-apex.com/sql-embedded-into-plsql/</a></p>
<p> <img src='http://www.inside-oracle-apex.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>WBR, Yuri</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ApEx Developer</title>
		<link>http://www.inside-oracle-apex.com/caution-when-using-plsql-functions-in-sql-statement/comment-page-1/#comment-2838</link>
		<dc:creator>ApEx Developer</dc:creator>
		<pubDate>Thu, 19 Mar 2009 17:56:21 +0000</pubDate>
		<guid isPermaLink="false">http://www.inside-oracle-apex.com/en/?p=12#comment-2838</guid>
		<description>Patrick,

your absolutely right. But my 12 years DBA&#039;s background and experience tells me this issue is not an Oracle - it&#039;s brain issue ;) for developers. Just explain plan for every query incorporated into ApEx and a bit think - and much PL/SQL-SQL issues will be obvious.

I&#039;ve checked execution plan for EVERY query I wrote for ApEx applications. Every query is testing on real volumes of data. Every front-end query is tuning for response time. Always.

Well-tuned queries = quick responses Web-applications.

This is the most important for hybrid PL/SQL-SQL code - quality and performance of all code.

&quot;Divide et impera&quot; - a good principe not only in politics, but also in programming.

In my example - separated computation of function wich ALWAYS must be determimistic ALWAYS gives incredible performance impact.</description>
		<content:encoded><![CDATA[<p>Patrick,</p>
<p>your absolutely right. But my 12 years DBA&#8217;s background and experience tells me this issue is not an Oracle &#8211; it&#8217;s brain issue <img src='http://www.inside-oracle-apex.com/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  for developers. Just explain plan for every query incorporated into ApEx and a bit think &#8211; and much PL/SQL-SQL issues will be obvious.</p>
<p>I&#8217;ve checked execution plan for EVERY query I wrote for ApEx applications. Every query is testing on real volumes of data. Every front-end query is tuning for response time. Always.</p>
<p>Well-tuned queries = quick responses Web-applications.</p>
<p>This is the most important for hybrid PL/SQL-SQL code &#8211; quality and performance of all code.</p>
<p>&#8220;Divide et impera&#8221; &#8211; a good principe not only in politics, but also in programming.</p>
<p>In my example &#8211; separated computation of function wich ALWAYS must be determimistic ALWAYS gives incredible performance impact.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Wolf</title>
		<link>http://www.inside-oracle-apex.com/caution-when-using-plsql-functions-in-sql-statement/comment-page-1/#comment-2777</link>
		<dc:creator>Patrick Wolf</dc:creator>
		<pubDate>Wed, 18 Mar 2009 13:39:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.inside-oracle-apex.com/en/?p=12#comment-2777</guid>
		<description>Yuri,

I&#039;m not so sure if it was well-known by the average developer. And if you know something you always think that&#039;s trivial and why haven&#039;t I known this before. :-)

Regards
Patrick</description>
		<content:encoded><![CDATA[<p>Yuri,</p>
<p>I&#8217;m not so sure if it was well-known by the average developer. And if you know something you always think that&#8217;s trivial and why haven&#8217;t I known this before. <img src='http://www.inside-oracle-apex.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Regards<br />
Patrick</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yuri</title>
		<link>http://www.inside-oracle-apex.com/caution-when-using-plsql-functions-in-sql-statement/comment-page-1/#comment-2707</link>
		<dc:creator>Yuri</dc:creator>
		<pubDate>Sun, 15 Mar 2009 15:41:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.inside-oracle-apex.com/en/?p=12#comment-2707</guid>
		<description>This is well-known and obvious for SQL-tuners thing.

Just ALWAYS test all SQL and PL/SQL code for real data volumes before production and this &#039;problem&#039; solves natively.

Anyway, when use TurDuckEn code of ApEx, PL/SQL is most uses language. 

So, all trivial:

declare
 v_x number;
 v_res varchar2;
bedin
 v_x := f(p_x);
 select abc
 into v_res
 from t_table
 where v_x between col1 and col2;
end;

works more better than

declare
 v_res varchar2;
bedin
 select abc
 into v_res
 from t_table
 where f(p_x) between col1 and col2;
end;

Depending of table size - the difference in speed for both blocks can consists from 30 to 300 times.

No matter how good table indexes.

In second example the f() function calls every time in RANGE SCAN with index for query.

As I said - trivial.

Patrick, I think, Your target audithory not so stupid. :)</description>
		<content:encoded><![CDATA[<p>This is well-known and obvious for SQL-tuners thing.</p>
<p>Just ALWAYS test all SQL and PL/SQL code for real data volumes before production and this &#8216;problem&#8217; solves natively.</p>
<p>Anyway, when use TurDuckEn code of ApEx, PL/SQL is most uses language. </p>
<p>So, all trivial:</p>
<p>declare<br />
 v_x number;<br />
 v_res varchar2;<br />
bedin<br />
 v_x := f(p_x);<br />
 select abc<br />
 into v_res<br />
 from t_table<br />
 where v_x between col1 and col2;<br />
end;</p>
<p>works more better than</p>
<p>declare<br />
 v_res varchar2;<br />
bedin<br />
 select abc<br />
 into v_res<br />
 from t_table<br />
 where f(p_x) between col1 and col2;<br />
end;</p>
<p>Depending of table size &#8211; the difference in speed for both blocks can consists from 30 to 300 times.</p>
<p>No matter how good table indexes.</p>
<p>In second example the f() function calls every time in RANGE SCAN with index for query.</p>
<p>As I said &#8211; trivial.</p>
<p>Patrick, I think, Your target audithory not so stupid. <img src='http://www.inside-oracle-apex.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Patrick Wolf</title>
		<link>http://www.inside-oracle-apex.com/caution-when-using-plsql-functions-in-sql-statement/comment-page-1/#comment-734</link>
		<dc:creator>Patrick Wolf</dc:creator>
		<pubDate>Fri, 01 Dec 2006 08:18:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.inside-oracle-apex.com/en/?p=12#comment-734</guid>
		<description>Hi Damir,&lt;br /&gt;&lt;br /&gt;for a table with just a few rows it&#039;s probably no problem, but there are always tables which have more rows in them and developers tend to use &quot;design patterns&quot; they have already used in the past. And in that case you have bad performance.&lt;br /&gt;&lt;br /&gt;I think in such a case it&#039;s better to already come up with a more  performant solution, also for the small tables. To have a better &quot;design pattern&quot; for the future, where you don&#039;t have to care anymore.&lt;br /&gt;&lt;br /&gt;I think using the APEX feature &quot;Application Attributes/Edit Security Attributes/Virtual Private Database&quot; is a much better approach. Setting the context with DBMS_Session.set_context and using SYS_CONTEXT in the view definition is much better. I can not prove it, but I would assume that the SYS_CONTEXT is defined deterministic and just called once by the optimizer/query engine.</description>
		<content:encoded><![CDATA[<p>Hi Damir,</p>
<p>for a table with just a few rows it&#8217;s probably no problem, but there are always tables which have more rows in them and developers tend to use &#8220;design patterns&#8221; they have already used in the past. And in that case you have bad performance.</p>
<p>I think in such a case it&#8217;s better to already come up with a more  performant solution, also for the small tables. To have a better &#8220;design pattern&#8221; for the future, where you don&#8217;t have to care anymore.</p>
<p>I think using the APEX feature &#8220;Application Attributes/Edit Security Attributes/Virtual Private Database&#8221; is a much better approach. Setting the context with DBMS_Session.set_context and using SYS_CONTEXT in the view definition is much better. I can not prove it, but I would assume that the SYS_CONTEXT is defined deterministic and just called once by the optimizer/query engine.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Damir</title>
		<link>http://www.inside-oracle-apex.com/caution-when-using-plsql-functions-in-sql-statement/comment-page-1/#comment-733</link>
		<dc:creator>Damir</dc:creator>
		<pubDate>Fri, 01 Dec 2006 07:13:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.inside-oracle-apex.com/en/?p=12#comment-733</guid>
		<description>As I said in thread, our problems was basically based on parameter views (where somecol=v(&#039;SOME_ITEM&#039;)&lt;br /&gt;&lt;br /&gt;So in such a cases &quot;v&quot; is almost inevitable....but issue is the sameinevitable (http://forums.oracle.com/forums/post!reply.jspa?messageID=1558784)</description>
		<content:encoded><![CDATA[<p>As I said in thread, our problems was basically based on parameter views (where somecol=v(&#8216;SOME_ITEM&#8217;)</p>
<p>So in such a cases &#8220;v&#8221; is almost inevitable&#8230;.but issue is the sameinevitable (<a href="http://forums.oracle.com/forums/post!reply.jspa?messageID=1558784" rel="nofollow" target="_blank" class="liexternal">http://forums.oracle.com/forums/post!reply.jspa?messageID=1558784</a>)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

