<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>blog.watashii &#187; performance</title>
	<atom:link href="http://blog.watashii.com/tag/performance/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.watashii.com</link>
	<description></description>
	<lastBuildDate>Wed, 02 Nov 2011 02:23:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<item>
		<title>Vacuum Database to Speedup Firefox</title>
		<link>http://blog.watashii.com/2009/08/vacuum-database-to-speedup-firefox/</link>
		<comments>http://blog.watashii.com/2009/08/vacuum-database-to-speedup-firefox/#comments</comments>
		<pubDate>Tue, 25 Aug 2009 05:37:15 +0000</pubDate>
		<dc:creator>watashii</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[vacuum]]></category>

		<guid isPermaLink="false">http://blog.watashii.com/?p=225</guid>
		<description><![CDATA[Firefox performance can be improved by defragmenting the internal SQLite database.  This can be done by running a vacuum command within Firefox, as explained in Mozilla Links.   The process are as follows: 1) Open Tools &#62; Error Console (or Press Ctrl + Shift + J) 2) In the Code text box, paste the following (in [...]


Related Posts:<ol><li><a href='http://blog.watashii.com/2008/06/firefox-30/' rel='bookmark' title='Permanent Link: Firefox 3.0 Upgraded'>Firefox 3.0 Upgraded</a></li>
<li><a href='http://blog.watashii.com/2008/08/viewing-firefox-cache-files/' rel='bookmark' title='Permanent Link: Viewing Firefox Cache Files'>Viewing Firefox Cache Files</a></li>
<li><a href='http://blog.watashii.com/2008/07/add-search-engines-to-firefox/' rel='bookmark' title='Permanent Link: Add Search Engines to Firefox'>Add Search Engines to Firefox</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-226" title="vacuum_firefox" src="http://blog.watashii.com/wp-content/uploads/2009/08/vacuum_firefox.png" alt="vacuum_firefox" width="499" height="194" /></p>
<p>Firefox performance can be improved by defragmenting the internal SQLite database.  This can be done by running a vacuum command within Firefox, as explained in <a href="http://mozillalinks.org/wp/2009/08/vacuum-firefox-databases-for-better-performance-now-with-no-restart/" target="_blank">Mozilla Links</a>.   The process are as follows:</p>
<p>1) Open <strong>Tools </strong>&gt; <strong>Error Console </strong>(or Press Ctrl + Shift + J)</p>
<p>2) In the <strong>Code </strong>text box, paste the following (in one single line)</p>
<pre><code>Components.classes["@mozilla.org/browser/nav-history-service;1"].
getService(Components.interfaces.nsPIPlacesDatabase).
DBConnection.executeSimpleSQL("VACUUM"); </code></pre>
<p><em>Note:  Make sure the double-quotes are normal quotes and not slanted quotes</em></p>
<p>3) Press <strong>Evaluate</strong>.  Firefox will freeze for a few seconds while the database is being defragmented.</p>
<p>A handier <a title="Vacuum Places" href="https://addons.mozilla.org/en-US/firefox/addon/13878" target="_blank">add-on extension</a> is also available to perform this action.</p>


<p>Related Posts:<ol><li><a href='http://blog.watashii.com/2008/06/firefox-30/' rel='bookmark' title='Permanent Link: Firefox 3.0 Upgraded'>Firefox 3.0 Upgraded</a></li>
<li><a href='http://blog.watashii.com/2008/08/viewing-firefox-cache-files/' rel='bookmark' title='Permanent Link: Viewing Firefox Cache Files'>Viewing Firefox Cache Files</a></li>
<li><a href='http://blog.watashii.com/2008/07/add-search-engines-to-firefox/' rel='bookmark' title='Permanent Link: Add Search Engines to Firefox'>Add Search Engines to Firefox</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.watashii.com/2009/08/vacuum-database-to-speedup-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exercise Your Idle System Doing Nothing</title>
		<link>http://blog.watashii.com/2009/04/exercise-your-idle-system-doing-nothing/</link>
		<comments>http://blog.watashii.com/2009/04/exercise-your-idle-system-doing-nothing/#comments</comments>
		<pubDate>Thu, 30 Apr 2009 15:15:49 +0000</pubDate>
		<dc:creator>watashii</dc:creator>
				<category><![CDATA[Unix]]></category>
		<category><![CDATA[null]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[zero]]></category>

		<guid isPermaLink="false">http://blog.watashii.com/?p=178</guid>
		<description><![CDATA[Via Unix/Linux: cat /dev/zero &#62; /dev/null or cp /dev/zero  /dev/null Explaination: /dev/null is basically a black hole (a special null file), anything written to it goes down the drain.  Anything read from it will result in nothing returned.  /dev/zero is basically the same as /dev/null when writing to it, however reading it will result in [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-182" title="sleepy_idle" src="http://blog.watashii.com/wp-content/uploads/2009/04/sleepy_idle.jpg" alt="sleepy_idle" width="450" height="337" /></p>
<p><strong>Via Unix/Linux:</strong></p>
<pre><code>cat /dev/zero &gt; /dev/null</code></pre>
<p>or</p>
<pre><code>cp /dev/zero  /dev/null</code></pre>
<p><strong>Explaination:</strong></p>
<p>/dev/null is basically a black hole (a special null file), anything written to it goes down the drain.  Anything read from it will result in nothing returned.  /dev/zero is basically the same as /dev/null when writing to it, however reading it will result in a continuous stream of zeros without EOF.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.watashii.com/2009/04/exercise-your-idle-system-doing-nothing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Oracle Index Null Values</title>
		<link>http://blog.watashii.com/2008/09/oracle-null-indexing/</link>
		<comments>http://blog.watashii.com/2008/09/oracle-null-indexing/#comments</comments>
		<pubDate>Sun, 21 Sep 2008 12:02:39 +0000</pubDate>
		<dc:creator>watashii</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[index]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://blog.watashii.com/?p=66</guid>
		<description><![CDATA[When creating Oracle indexes, Oracle ignores the NULL values.  For example, the following index was created over &#8220;emp_name&#8221; column. create index emp_name_idx on employees (emp_name); Querying for a NULL value on the indexed column would yield a full table scan. select emp_name from employees where emp_name is NULL; So how can we make Oracle perform [...]


Related Posts:<ol><li><a href='http://blog.watashii.com/2008/08/oracle-sql-loader-importing-csv-files-into-a-table/' rel='bookmark' title='Permanent Link: Oracle SQL Loader &#8211; Importing CSV files to a table'>Oracle SQL Loader &#8211; Importing CSV files to a table</a></li>
<li><a href='http://blog.watashii.com/2008/07/plsql-pipelined-table-function/' rel='bookmark' title='Permanent Link: PL/SQL &#8211; Pipelined Table Function'>PL/SQL &#8211; Pipelined Table Function</a></li>
<li><a href='http://blog.watashii.com/2009/11/oracle-timezone-conversions-gmt-to-localtime/' rel='bookmark' title='Permanent Link: Oracle Timezone Conversions &#8211; GMT to localtime (and back)'>Oracle Timezone Conversions &#8211; GMT to localtime (and back)</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>When creating Oracle indexes, Oracle ignores the NULL values.  For example, the following index was created over &#8220;emp_name&#8221; column.</p>
<pre name="code" class="sql">create index emp_name_idx
on employees (emp_name);</pre>
<p>Querying for a NULL value on the indexed column would yield a full table scan.</p>
<pre name="code" class="sql">select emp_name from employees where emp_name is NULL;</pre>
<p>So how can we make Oracle perform a fast indexed search?</p>
<p>The solution is to index NULL values with a function-based index.  The following example replaces all the NULL values with a string named &#8216;null&#8217; (note, this can be any arbitrary string).  This allows the NULL to be included as if it was a real value.</p>
<pre name="code" class="sql">create index emp_name_idx
on employees (nvl(emp_name,'null'));</pre>


<p>Related Posts:<ol><li><a href='http://blog.watashii.com/2008/08/oracle-sql-loader-importing-csv-files-into-a-table/' rel='bookmark' title='Permanent Link: Oracle SQL Loader &#8211; Importing CSV files to a table'>Oracle SQL Loader &#8211; Importing CSV files to a table</a></li>
<li><a href='http://blog.watashii.com/2008/07/plsql-pipelined-table-function/' rel='bookmark' title='Permanent Link: PL/SQL &#8211; Pipelined Table Function'>PL/SQL &#8211; Pipelined Table Function</a></li>
<li><a href='http://blog.watashii.com/2009/11/oracle-timezone-conversions-gmt-to-localtime/' rel='bookmark' title='Permanent Link: Oracle Timezone Conversions &#8211; GMT to localtime (and back)'>Oracle Timezone Conversions &#8211; GMT to localtime (and back)</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.watashii.com/2008/09/oracle-null-indexing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Viewing Firefox Cache Files</title>
		<link>http://blog.watashii.com/2008/08/viewing-firefox-cache-files/</link>
		<comments>http://blog.watashii.com/2008/08/viewing-firefox-cache-files/#comments</comments>
		<pubDate>Sat, 09 Aug 2008 08:55:42 +0000</pubDate>
		<dc:creator>watashii</dc:creator>
				<category><![CDATA[Software]]></category>
		<category><![CDATA[about:cache]]></category>
		<category><![CDATA[cache]]></category>
		<category><![CDATA[disk cache]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[memory cache]]></category>
		<category><![CDATA[offline cache]]></category>
		<category><![CDATA[performance]]></category>

		<guid isPermaLink="false">http://blog.watashii.com/?p=44</guid>
		<description><![CDATA[The browser cache stores all the web pages and images downloaded on to the computer to allow faster access and reduce the downloading bandwidth when revisiting a website. Type &#8220;about:cache&#8221; on your Firefox address bar to view the cached files.  There are 3 types of cache for allocating the files&#8230; 1) Memory cache device, stores [...]


Related Posts:<ol><li><a href='http://blog.watashii.com/2009/08/vacuum-database-to-speedup-firefox/' rel='bookmark' title='Permanent Link: Vacuum Database to Speedup Firefox'>Vacuum Database to Speedup Firefox</a></li>
<li><a href='http://blog.watashii.com/2008/06/firefox-30/' rel='bookmark' title='Permanent Link: Firefox 3.0 Upgraded'>Firefox 3.0 Upgraded</a></li>
<li><a href='http://blog.watashii.com/2008/07/add-search-engines-to-firefox/' rel='bookmark' title='Permanent Link: Add Search Engines to Firefox'>Add Search Engines to Firefox</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.watashii.com/wp-content/uploads/2008/08/ffcache.png"><img class="alignnone size-full wp-image-45" title="Firefox cache" src="http://blog.watashii.com/wp-content/uploads/2008/08/ffcache.png" alt="" width="374" height="75" /></a></p>
<p>The browser cache stores all the web pages and images downloaded on to the computer to allow faster access and reduce the downloading bandwidth when revisiting a website.</p>
<p>Type <strong>&#8220;about:cache&#8221;</strong> on your Firefox address bar to view the cached files.  There are 3 types of cache for allocating the files&#8230;</p>
<p><span id="more-44"></span></p>
<p>1) <strong>Memory cache device</strong>, stores all the files which are downloaded per session into your computers RAM (or temporary memory).  This means after you restart your Firefox, the files will be cleared out.</p>
<p>2) <strong>Disk cache device</strong>, stores all the files into your hard disk drive.  This is some file location in your computer, for example within your Windows C:\ drive.  These are available after restarting the Firefox and accessible without an internet connection.</p>
<p>3) <strong>Offline cache device</strong>, stores all the files which can be used for offline browsing.  Typically it is empty, but is targeted for upcoming offline applications.  Watch this space.</p>
<p>One useful tip to improve FIrefox performance is to disable disk cache (or set <em>Tools &gt; Options &gt; Advanced &gt; Network &gt; Offline Storage: Use 0Mb</em>).  What this means to to purely rely on the RAM memory for cached data, and not read from the disk.  A simple concept: memory read speed is faster than disk read speed.</p>


<p>Related Posts:<ol><li><a href='http://blog.watashii.com/2009/08/vacuum-database-to-speedup-firefox/' rel='bookmark' title='Permanent Link: Vacuum Database to Speedup Firefox'>Vacuum Database to Speedup Firefox</a></li>
<li><a href='http://blog.watashii.com/2008/06/firefox-30/' rel='bookmark' title='Permanent Link: Firefox 3.0 Upgraded'>Firefox 3.0 Upgraded</a></li>
<li><a href='http://blog.watashii.com/2008/07/add-search-engines-to-firefox/' rel='bookmark' title='Permanent Link: Add Search Engines to Firefox'>Add Search Engines to Firefox</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.watashii.com/2008/08/viewing-firefox-cache-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>PL/SQL &#8211; Pipelined Table Function</title>
		<link>http://blog.watashii.com/2008/07/plsql-pipelined-table-function/</link>
		<comments>http://blog.watashii.com/2008/07/plsql-pipelined-table-function/#comments</comments>
		<pubDate>Wed, 02 Jul 2008 13:16:33 +0000</pubDate>
		<dc:creator>watashii</dc:creator>
				<category><![CDATA[Database]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[oracle]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[pipelined]]></category>

		<guid isPermaLink="false">http://blog.watashii.com/?p=22</guid>
		<description><![CDATA[Normally when writing PL/SQL functions, they return a single value result.  But what if you want to return a collection type instead?  The easiest way to do this is via a pipelined function, with the PIPELINED keyword, in which rows are returned by the function iteratively.   It can be created at the schema level, or [...]


Related Posts:<ol><li><a href='http://blog.watashii.com/2008/08/oracle-sql-loader-importing-csv-files-into-a-table/' rel='bookmark' title='Permanent Link: Oracle SQL Loader &#8211; Importing CSV files to a table'>Oracle SQL Loader &#8211; Importing CSV files to a table</a></li>
<li><a href='http://blog.watashii.com/2008/09/oracle-null-indexing/' rel='bookmark' title='Permanent Link: Oracle Index Null Values'>Oracle Index Null Values</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Normally when writing PL/SQL functions, they return a single value result.  But what if you want to return a collection type instead?  The easiest way to do this is via a pipelined function, with the PIPELINED keyword, in which rows are returned by the function iteratively.   It can be created at the schema level, or inside a package.  I prefer the latter since its more portable, and easier to manage.</p>
<p>Inside the function, you return individual elements of the collection type, instead of returning the entire collection type when function ends.  This also has performance benefits, depending on your application.</p>
<p><span id="more-22"></span></p>
<p>The code below defines a custom number collection type and a pipelined function; within a package / package body.</p>
<pre name="code" class="sql">
CREATE PACKAGE mypackage AS
  TYPE num_type IS TABLE OF NUMBER;
  FUNCTION myfunction (x NUMBER) RETURN num_type PIPELINED;
END mypackage;
/

CREATE PACKAGE BODY mypackage AS
  -- myfunction returns a collection of elements (1,2,3,... x)
  FUNCTION myfunction (x NUMBER) RETURN num_type PIPELINED IS
    BEGIN
      FOR i IN 1..x LOOP
        -- each number is returned per iteration
        PIPE ROW(i);
      END LOOP;
      RETURN;
    END;
END mypackage;
/
</pre>
<p>To call the function, simply call:</p>
<pre name="code" class="sql">
SELECT * FROM TABLE(mypackage.myfunction(5));
</pre>
<p>Which results in:<br />
<code><br />
COLUMN_VALUE<br />
------------<br />
           1<br />
           2<br />
           3<br />
           4<br />
           5<br />
</code></p>


<p>Related Posts:<ol><li><a href='http://blog.watashii.com/2008/08/oracle-sql-loader-importing-csv-files-into-a-table/' rel='bookmark' title='Permanent Link: Oracle SQL Loader &#8211; Importing CSV files to a table'>Oracle SQL Loader &#8211; Importing CSV files to a table</a></li>
<li><a href='http://blog.watashii.com/2008/09/oracle-null-indexing/' rel='bookmark' title='Permanent Link: Oracle Index Null Values'>Oracle Index Null Values</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://blog.watashii.com/2008/07/plsql-pipelined-table-function/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

