<?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: SQLite simple timing profiler patch</title>
	<atom:link href="http://katastrophos.net/andre/blog/2007/01/04/sqlite-simple-timing-profiler-patch/feed/" rel="self" type="application/rss+xml" />
	<link>http://katastrophos.net/andre/blog/2007/01/04/sqlite-simple-timing-profiler-patch/</link>
	<description>Chaotic solutions and random thoughts from the restless mind of a notorious problem solver (TM), by Andre Beckedorf</description>
	<pubDate>Tue, 06 Jan 2009 19:10:33 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.7</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Mahalakshmi</title>
		<link>http://katastrophos.net/andre/blog/2007/01/04/sqlite-simple-timing-profiler-patch/comment-page-1/#comment-7646</link>
		<dc:creator>Mahalakshmi</dc:creator>
		<pubDate>Mon, 16 Apr 2007 08:36:07 +0000</pubDate>
		<guid isPermaLink="false">http://katastrophos.net/andre/blog/2007/01/04/sqlite-simple-timing-profiler-patch/#comment-7646</guid>
		<description>Hi,
 
I created a table named MUSIC in sqlite.It consists of 11 fields which is as follows.
 
"create table MUSIC(Id integer primary key,
                        Album text not null collate nocase default 'Unknown' ,
                        URL text not null collate nocase default 'Unknown' ,
                        Duration integer,
                        Track integer,
                        BitRate integer,
                        sampleRate integer,
                        Channels integer,
                        Genre text not null collate nocase default 'Unknown',
                        Artist text not null collate nocase default 'Unknown',
                        Filesize integer);"
 
I want to optimise the speed so i performed indexing for Album,Artist and Genre fields alone.
But i could not find anyoptimization after indexing these 3 fields.
I tried with indexing all the fields but still i could not achieve optimization.
 
I will often use only these following statements
 
"select distinct Album from MUSIC;"
"select distinct Artist from MUSIC;"
" select distinct Album  from MUSIC where Artist=''A.R.Rehman' ;"
" select URL from MUSIC where Artist=''A.R.Rehman'  and  Album='Vantae Mathram';"
" select * from MUSIC where Artist=''A.R.Rehman'  and  Album='Vantae Mathram';"
 
 
Can u please help  me to make maximum optimization for the previous statements.




Regards,
M.Mahalakshmi</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>I created a table named MUSIC in sqlite.It consists of 11 fields which is as follows.</p>
<p>&#8220;create table MUSIC(Id integer primary key,<br />
                        Album text not null collate nocase default &#8216;Unknown&#8217; ,<br />
                        URL text not null collate nocase default &#8216;Unknown&#8217; ,<br />
                        Duration integer,<br />
                        Track integer,<br />
                        BitRate integer,<br />
                        sampleRate integer,<br />
                        Channels integer,<br />
                        Genre text not null collate nocase default &#8216;Unknown&#8217;,<br />
                        Artist text not null collate nocase default &#8216;Unknown&#8217;,<br />
                        Filesize integer);&#8221;</p>
<p>I want to optimise the speed so i performed indexing for Album,Artist and Genre fields alone.<br />
But i could not find anyoptimization after indexing these 3 fields.<br />
I tried with indexing all the fields but still i could not achieve optimization.</p>
<p>I will often use only these following statements</p>
<p>&#8220;select distinct Album from MUSIC;&#8221;<br />
&#8220;select distinct Artist from MUSIC;&#8221;<br />
&#8221; select distinct Album  from MUSIC where Artist=&#8221;A.R.Rehman&#8217; ;&#8221;<br />
&#8221; select URL from MUSIC where Artist=&#8221;A.R.Rehman&#8217;  and  Album=&#8217;Vantae Mathram&#8217;;&#8221;<br />
&#8221; select * from MUSIC where Artist=&#8221;A.R.Rehman&#8217;  and  Album=&#8217;Vantae Mathram&#8217;;&#8221;</p>
<p>Can u please help  me to make maximum optimization for the previous statements.</p>
<p>Regards,<br />
M.Mahalakshmi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: “Yet Another Zaurus Media Player”… done differently . (Phase 2: Development progress, no release yet.) at Katastrophos.net Blog</title>
		<link>http://katastrophos.net/andre/blog/2007/01/04/sqlite-simple-timing-profiler-patch/comment-page-1/#comment-2570</link>
		<dc:creator>“Yet Another Zaurus Media Player”… done differently . (Phase 2: Development progress, no release yet.) at Katastrophos.net Blog</dc:creator>
		<pubDate>Sat, 06 Jan 2007 03:49:16 +0000</pubDate>
		<guid isPermaLink="false">http://katastrophos.net/andre/blog/2007/01/04/sqlite-simple-timing-profiler-patch/#comment-2570</guid>
		<description>[...] With that being said, different rules in database design apply for embedded systems: In the third approach I already created a pretty decent database schema. Something I naturally would have done on a desktop system. Keeping the layout clean, using relations where applicable, minimizing data storage requirements. On a desktop system dereferencing and joining tables is fast. However, not so on my Zaurus: Simple left-joins over three tables would take up to a few hundred milliseconds. In contrast, these queries are almost unmeasurable on my desktop system, meaning they were faster than 10 ms. Now add a few other equally expensive queries to that and imagine, you&#8217;re doing a search on your playlist with 2000 items. Do you want to wait 3 seconds or longer for the result? That&#8217;s not what I call interactive. So, I had a nice profiling, optimizing and testing marathon last weekend. To make a long story short, after analyzing the bottlenecks and also having a lengthy discussion with a DB-guru friend, I ended up simplifying the database schema in a direction I wouldn&#8217;t normally take on a desktop system. It&#8217;s not totally ugly now, but it&#8217;s just not as relational as you might expect a SQL database to be. Also, some data is redundantly held in temporary tables, which isn&#8217;t nice either, but helps performance A LOT. In order to do the profiling I made some changes to the SQLite codebase, which I will post shortly along with some optimization hints. Update: Hints here, patch here. [...]</description>
		<content:encoded><![CDATA[<p>[...] With that being said, different rules in database design apply for embedded systems: In the third approach I already created a pretty decent database schema. Something I naturally would have done on a desktop system. Keeping the layout clean, using relations where applicable, minimizing data storage requirements. On a desktop system dereferencing and joining tables is fast. However, not so on my Zaurus: Simple left-joins over three tables would take up to a few hundred milliseconds. In contrast, these queries are almost unmeasurable on my desktop system, meaning they were faster than 10 ms. Now add a few other equally expensive queries to that and imagine, you&#8217;re doing a search on your playlist with 2000 items. Do you want to wait 3 seconds or longer for the result? That&#8217;s not what I call interactive. So, I had a nice profiling, optimizing and testing marathon last weekend. To make a long story short, after analyzing the bottlenecks and also having a lengthy discussion with a DB-guru friend, I ended up simplifying the database schema in a direction I wouldn&#8217;t normally take on a desktop system. It&#8217;s not totally ugly now, but it&#8217;s just not as relational as you might expect a SQL database to be. Also, some data is redundantly held in temporary tables, which isn&#8217;t nice either, but helps performance A LOT. In order to do the profiling I made some changes to the SQLite codebase, which I will post shortly along with some optimization hints. Update: Hints here, patch here. [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: SQLite performance tuning and optimization on embedded systems at Katastrophos.net Blog</title>
		<link>http://katastrophos.net/andre/blog/2007/01/04/sqlite-simple-timing-profiler-patch/comment-page-1/#comment-2471</link>
		<dc:creator>SQLite performance tuning and optimization on embedded systems at Katastrophos.net Blog</dc:creator>
		<pubDate>Thu, 04 Jan 2007 10:31:25 +0000</pubDate>
		<guid isPermaLink="false">http://katastrophos.net/andre/blog/2007/01/04/sqlite-simple-timing-profiler-patch/#comment-2471</guid>
		<description>[...] Software          &#171; “Yet Another Zaurus Media Player”… done differently . (Phase 2: &#8220;Development progress, no release yet.&#8221;) SQLite simple timing profiler patch &#187; [...]</description>
		<content:encoded><![CDATA[<p>[...] Software          &laquo; “Yet Another Zaurus Media Player”… done differently . (Phase 2: &#8220;Development progress, no release yet.&#8221;) SQLite simple timing profiler patch &raquo; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andre</title>
		<link>http://katastrophos.net/andre/blog/2007/01/04/sqlite-simple-timing-profiler-patch/comment-page-1/#comment-2470</link>
		<dc:creator>Andre</dc:creator>
		<pubDate>Thu, 04 Jan 2007 10:29:48 +0000</pubDate>
		<guid isPermaLink="false">http://katastrophos.net/andre/blog/2007/01/04/sqlite-simple-timing-profiler-patch/#comment-2470</guid>
		<description>Please note, that this patch only measures the raw CPU time elapsed while executing a query. This is not equal to the realtime requirements.</description>
		<content:encoded><![CDATA[<p>Please note, that this patch only measures the raw CPU time elapsed while executing a query. This is not equal to the realtime requirements.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
