<?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>PHP Interview Questions and answers&#187; SP&#8217;s archives  &#8211; interview questions and answers</title>
	<atom:link href="http://www.phpinterviewquestions.com/tag/sps/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.phpinterviewquestions.com</link>
	<description>Prepare for your next php based interview with high confidence</description>
	<lastBuildDate>Mon, 26 Sep 2011 08:37:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Stored procedures,  Triggers,  Indexes</title>
		<link>http://www.phpinterviewquestions.com/mysql-interview-questions/expert-level-mysql-interview-questions/stored-procedures-triggers-indexes/</link>
		<comments>http://www.phpinterviewquestions.com/mysql-interview-questions/expert-level-mysql-interview-questions/stored-procedures-triggers-indexes/#comments</comments>
		<pubDate>Tue, 23 Feb 2010 05:19:03 +0000</pubDate>
		<dc:creator>Bart</dc:creator>
				<category><![CDATA[Expert level]]></category>
		<category><![CDATA[SP's]]></category>

		<guid isPermaLink="false">http://www.phpinterviewquestions.com/wordpress/?p=34</guid>
		<description><![CDATA[What are the advantages of stored procedures, triggers, indexes?
stored procedure is a set of SQL commands that can be compiled and stored in the server. Once this has been done, clients donâ€™t need to keep re-issuing the entire query but can refer to the stored procedure. This provides better overall performance because the query has [...]]]></description>
			<content:encoded><![CDATA[<p>What are the advantages of stored procedures, triggers, indexes?</p>
<p><strong><em>stored procedure</em></strong> is a set of SQL commands that can be compiled and stored in the server. Once this has been done, clients donâ€™t need to keep re-issuing the entire query but can refer to the stored procedure. This provides better overall performance because the query has to be parsed only once, and less information needs to be sent between the server and the client. You can also raise the conceptual level by having libraries of functions in the server. However, stored procedures of course do increase the load on the database server system, as more of the work is done on the server side and less on the client (application) side.</p>
<p><strong><em>A trigger</em> </strong>is effectively a type of stored procedure, one that is invoked when a particular event occurs. For example, you can install a stored procedure that is triggered each time a record is deleted from a transaction table and that stored procedure automatically deletes the corresponding customer from a customer table when all his transactions are deleted.</p>
<p><strong><em>Indexes</em> </strong>are used to find rows with specific column values quickly. Without an index, MySQL must begin with the first row and then read through the entire table to find the relevant rows. The larger the table, the more this costs. If the table has an index for the columns in question, MySQL can quickly determine the position to seek to in the middle of the data file without having to look at all the data. If a table has 1,000 rows, this is at least 100 times faster than reading sequentially. If you need to access most of the rows, it is faster to read sequentially, because this minimizes disk seeks.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.phpinterviewquestions.com/mysql-interview-questions/expert-level-mysql-interview-questions/stored-procedures-triggers-indexes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

