<?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>Bagesh Singh&#039;s Blog &#187; mysql</title>
	<atom:link href="http://www.bageshsingh.com/bagesh-blog/category/mysql/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.bageshsingh.com/bagesh-blog</link>
	<description>Shortest Distance to  Web Solutions &#38; Software Solutions</description>
	<lastBuildDate>Wed, 22 Feb 2012 18:42:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>how to do table partition in mysql</title>
		<link>http://www.bageshsingh.com/bagesh-blog/2012/02/how-to-do-table-partition-in-mysql/</link>
		<comments>http://www.bageshsingh.com/bagesh-blog/2012/02/how-to-do-table-partition-in-mysql/#comments</comments>
		<pubDate>Wed, 22 Feb 2012 18:42:12 +0000</pubDate>
		<dc:creator>Bagesh Singh</dc:creator>
				<category><![CDATA[how-to]]></category>
		<category><![CDATA[humor]]></category>
		<category><![CDATA[Interview Question]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[MYSQL DBA]]></category>
		<category><![CDATA[mysql partitioning]]></category>
		<category><![CDATA[partition in mysql]]></category>
		<category><![CDATA[php programmer]]></category>

		<guid isPermaLink="false">http://www.bageshsingh.com/bagesh-blog/?p=1657</guid>
		<description><![CDATA[HI all of my php programmer. Mostly MYSQL DBA done the partitioning but if we talk about programmer then they are unable to do. so don’t worry friends here is the solutions for mysql partitioning in easy steps. First run this query to you panel and check patition is on or not. mysql> SHOW VARIABLES [...]]]></description>
			<content:encoded><![CDATA[<p>HI all of my php programmer.</p>
<p>Mostly MYSQL DBA done the partitioning but if we talk about programmer then they are unable to do.</p>
<p>so don’t worry friends here is the solutions for mysql partitioning in easy steps.</p>
<p>First run this query to you panel and check patition is on or not.</p>
<p>mysql> SHOW VARIABLES LIKE ‘%partition%’;</p>
<p>+——————-+——-+<br />
| Variable_name     | Value |<br />
+——————-+——-+<br />
| have_partitioning | YES   |<br />
+——————-+——-+</p>
<p>Result will come like this then this database fine to add table partition.</p>
<p>there is another query also that show all mysql plugins.</p>
<p>mysql> SHOW PLUGINS;</p>
<p>+————+———-+—————-+———+———+<br />
| Name       | Status   | Type           | Library | License |<br />
+————+———-+—————-+———+———+<br />
| binlog     | ACTIVE   | STORAGE ENGINE | NULL    | GPL     |<br />
| partition  | ACTIVE   | STORAGE ENGINE | NULL    | GPL     |<br />
| ARCHIVE    | ACTIVE   | STORAGE ENGINE | NULL    | GPL     |<br />
| BLACKHOLE  | ACTIVE   | STORAGE ENGINE | NULL    | GPL     |<br />
| CSV        | ACTIVE   | STORAGE ENGINE | NULL    | GPL     |<br />
| FEDERATED  | DISABLED | STORAGE ENGINE | NULL    | GPL     |<br />
| MEMORY     | ACTIVE   | STORAGE ENGINE | NULL    | GPL     |<br />
| InnoDB     | ACTIVE   | STORAGE ENGINE | NULL    | GPL     |<br />
| MRG_MYISAM | ACTIVE   | STORAGE ENGINE | NULL    | GPL     |<br />
| MyISAM     | ACTIVE   | STORAGE ENGINE | NULL    | GPL     |<br />
| ndbcluster | DISABLED | STORAGE ENGINE | NULL    | GPL     |<br />
+————+———-+—————-+———+———+</p>
<p>Then create a table and insert the value in that table.</p>
<p>mysql> CREATE TABLE bagesh_singh (id INT, name VARCHAR(50), purchased DATE)<br />
->     PARTITION BY RANGE( YEAR(purchased) ) (<br />
->         PARTITION p0 VALUES LESS THAN (1990),<br />
->         PARTITION p1 VALUES LESS THAN (1995),<br />
->         PARTITION p2 VALUES LESS THAN (2000),<br />
->         PARTITION p3 VALUES LESS THAN (2005)<br />
->     );</p>
<p>table is created based on Year partition</p>
<p>Then insert some value to there</p>
<p>mysql> INSERT INTO bagesh_singh VALUES<br />
->     (1, ‘desk organiser’, ’2003-10-15′),<br />
->     (2, ‘CD player’, ’1993-11-05′),<br />
->     (3, ‘TV set’, ’1996-03-10′),<br />
->     (4, ‘bookcase’, ’1982-01-10′),<br />
->     (5, ‘exercise bike’, ’2004-05-09′),<br />
->     (6, ‘sofa’, ’1987-06-05′),<br />
->     (7, ‘popcorn maker’, ’2001-11-22′),<br />
->     (8, ‘aquarium’, ’1992-08-04′),<br />
->     (9, ‘study desk’, ’1984-09-16′),<br />
->     (10, ‘lava lamp’, ’1998-12-25′);</p>
<p>10 rows will be inserted in table bagesh_singh</p>
<p>then run<br />
mysql> SELECT * FROM bagesh_singh<br />
-> WHERE purchased BETWEEN ’1995-01-01′ AND ’1999-12-31′;<br />
+——+———–+————+<br />
| id   | name      | purchased  |<br />
+——+———–+————+<br />
|    3 | TV set    | 1996-03-10 |<br />
|   10 | lava lamp | 1998-12-25 |<br />
+——+———–+————+</p>
<p>thes data will come in 0.00 sec it will make your table fast because of mysql table partition</p>
<p>mysql> ALTER TABLE tr DROP PARTITION p2;<br />
Query OK, 0 rows affected (0.03 sec)</p>
<p>you can drop partition using mysql ALTER command.</p>
<p>even you can add mysql table partition using ALTER command.</p>
<p>mysql> ALTER TABLE bagesh_singh ADD PARTITION (PARTITION p3 VALUES LESS THAN (2000));</p>
<p>To double check you can use this mysql command also</p>
<p>mysql> SHOW CREATE TABLE tr\G<br />
*************************** 1. row ***************************<br />
Table: bagesh_singh<br />
Create Table: CREATE TABLE `bagesh_singh` (<br />
`id` int(11) default NULL,<br />
`name` varchar(50) default NULL,<br />
`purchased` date default NULL<br />
) ENGINE=MyISAM DEFAULT CHARSET=latin1<br />
PARTITION BY RANGE ( YEAR(purchased) ) (<br />
PARTITION p0 VALUES LESS THAN (1990) ENGINE = MyISAM,<br />
PARTITION p1 VALUES LESS THAN (1995) ENGINE = MyISAM,<br />
PARTITION p3 VALUES LESS THAN (2005) ENGINE = MyISAM<br />
)<br />
1 row in set (0.01 sec)</p>
<p>This is very gud example for range mysql partitioning</p>
<p>CREATE TABLE oyerecharge_com (<br />
id INT NOT NULL,<br />
fname VARCHAR(50) NOT NULL,<br />
lname VARCHAR(50) NOT NULL,<br />
hired DATE NOT NULL<br />
)<br />
PARTITION BY RANGE( YEAR(hired) ) (<br />
PARTITION p1 VALUES LESS THAN (1991),<br />
PARTITION p2 VALUES LESS THAN (1996),<br />
PARTITION p3 VALUES LESS THAN (2001),<br />
PARTITION p4 VALUES LESS THAN (2005)<br />
);</p>
<p>ALTER TABLE oyerecharge_com ADD PARTITION (<br />
PARTITION p5 VALUES LESS THAN (2010),<br />
PARTITION p6 VALUES LESS THAN MAXVALUE<br />
);</p>
<p>I hope this article will be usefull for you.<br />
Best of luck</p>
<p>www.bageshsingh.com<br />
www.bageshsingh.com/bagesh-blog/</p>
<div id="seo_alrp_related"><h2>Posts Related to how to do table partition in mysql</h2><ul><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/05/mysql-handling-duplicates/" rel="bookmark">MySQL Handling Duplicates</a></h3><p>Tables or result sets sometimes contain duplicate records. Sometime it is allowed but sometime it is required to stop duplicate records. Sometime it is required ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/08/what-is-the-default-table-in-mysql/" rel="bookmark">What is the default table in MYSQL?</a></h3><p>What is the default table in MYSQL and which type of table is generatedby default. MyISAM is the default storage engine.</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/09/how-to-optimize-mysql-query-and-mysql-database/" rel="bookmark">How to optimize mysql query and mysql database?</a></h3><p>There is lots of way to optimize mysql. once you optimize your query and database of mysql it will make your website and application very ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/08/what-is-maximum-size-of-a-database-in-mysql/" rel="bookmark">What is maximum size of a database in MySQL?</a></h3><p>If the operating system or filesystem places a limit on the number of files in a directory, MySQL is bound by that constraint.The efficiency of ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2010/11/paging-using-php-and-mysql/" rel="bookmark">Paging Using PHP and MySQL</a></h3><p>When there's more than one column involved in paging there isn't much that we need to modify. We only need to decide how to count ...</p></div></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.bageshsingh.com/bagesh-blog/2012/02/how-to-do-table-partition-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to optimize mysql query and mysql database?</title>
		<link>http://www.bageshsingh.com/bagesh-blog/2011/09/how-to-optimize-mysql-query-and-mysql-database/</link>
		<comments>http://www.bageshsingh.com/bagesh-blog/2011/09/how-to-optimize-mysql-query-and-mysql-database/#comments</comments>
		<pubDate>Fri, 02 Sep 2011 20:41:37 +0000</pubDate>
		<dc:creator>Bagesh Singh</dc:creator>
				<category><![CDATA[Home]]></category>
		<category><![CDATA[how-to]]></category>
		<category><![CDATA[Interview Question]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql interview question]]></category>
		<category><![CDATA[Others]]></category>
		<category><![CDATA[tips and technique]]></category>
		<category><![CDATA[Be wary of locks]]></category>
		<category><![CDATA[but bad for writes]]></category>
		<category><![CDATA[constants) is very fast]]></category>
		<category><![CDATA[Create your tables with a fixed-table format if possible]]></category>
		<category><![CDATA[Do as much as your filtering in SQL as you can]]></category>
		<category><![CDATA[Don't create indexes you aren't going to use]]></category>
		<category><![CDATA[Don't use SELECT * unless you must]]></category>
		<category><![CDATA[Firstly choose which table being used every time for delete]]></category>
		<category><![CDATA[HIGH_PRIORITY]]></category>
		<category><![CDATA[How to optimize mysql query and mysql database]]></category>
		<category><![CDATA[including NOT NULL if appropriate - don't rely on automatic type conversion]]></category>
		<category><![CDATA[Increase your buffer sizes so that MySQL can cache more]]></category>
		<category><![CDATA[Indexes are good for reads]]></category>
		<category><![CDATA[insert or update make a list and always repair these tables. after 15 days]]></category>
		<category><![CDATA[Load your data before adding indexes is faster than adding indexes first]]></category>
		<category><![CDATA[of]]></category>
		<category><![CDATA[once you optimize your query and database of mysql it will make your website and application very fast]]></category>
		<category><![CDATA[or DELAYED when it matters]]></category>
		<category><![CDATA[Prioritise your queries as LOW_PRIORITY]]></category>
		<category><![CDATA[SELECT foo IN (list]]></category>
		<category><![CDATA[There is lots of way to optimize mysql]]></category>
		<category><![CDATA[this is very good question for mysql interview best of luck hope this will help for your good career]]></category>
		<category><![CDATA[Use --log-slow-queries to see where your tables can be optimised]]></category>
		<category><![CDATA[Use default values for INSERT when you can]]></category>
		<category><![CDATA[use numbers instead of strings if you can]]></category>
		<category><![CDATA[Use OPTIMIZE TABLE and ANALYZE TABLE regularly]]></category>
		<category><![CDATA[Use SHOW STATUS to make sure your MySQL server is in good condition]]></category>
		<category><![CDATA[Use temporary tables rather than heavy PHP work]]></category>
		<category><![CDATA[Use the best data type]]></category>
		<category><![CDATA[Use the EXPLAIN keyword to see how MySQL will execute your query - make sure your indexes are being used!]]></category>
		<category><![CDATA[Use the most efficient table type for each table]]></category>
		<category><![CDATA[When joining tables]]></category>

		<guid isPermaLink="false">http://www.bageshsingh.com/bagesh-blog/?p=1631</guid>
		<description><![CDATA[There is lots of way to optimize mysql. once you optimize your query and database of mysql it will make your website and application very fast. Firstly choose which table being used every time for delete, insert or update make a list and always repair these tables. after 15 days. this is very good question [...]]]></description>
			<content:encoded><![CDATA[<p>There is lots of way to optimize mysql. once you optimize your query and database of mysql it will make your website and application</p>
<p>very fast. Firstly choose which table being used every time for delete, insert or update make a list and always repair these tables.</p>
<p>after 15 days.</p>
<p>this is very good question for mysql interview best of luck hope this will help for your good career.</p>
<p>Prioritise your queries as LOW_PRIORITY, HIGH_PRIORITY, or DELAYED when it matters</p>
<p>Don&#8217;t use SELECT * unless you must</p>
<p>Use the EXPLAIN keyword to see how MySQL will execute your query &#8211; make sure your indexes are being used!</p>
<p>Load your data before adding indexes is faster than adding indexes first</p>
<p>Be wary of locks</p>
<p>Use &#8211;log-slow-queries to see where your tables can be optimised</p>
<p>Increase your buffer sizes so that MySQL can cache more</p>
<p>Use SHOW STATUS to make sure your MySQL server is in good condition</p>
<p>Don&#8217;t create indexes you aren&#8217;t going to use</p>
<p>Do as much as your filtering in SQL as you can</p>
<p>Indexes are good for reads, but bad for writes</p>
<p>Use OPTIMIZE TABLE and ANALYZE TABLE regularly</p>
<p>Create your tables with a fixed-table format if possible</p>
<p>Use the most efficient table type for each table</p>
<p>Use the best data type, including NOT NULL if appropriate &#8211; don&#8217;t rely on automatic type conversion</p>
<p>Use default values for INSERT when you can</p>
<p>Use temporary tables rather than heavy PHP work</p>
<p>SELECT foo IN (list, of, constants) is very fast</p>
<p>When joining tables, use numbers instead of strings if you can</p>
<div id="seo_alrp_related"><h2>Posts Related to How to optimize mysql query and mysql database?</h2><ul><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/08/how-to-do-mysql-optimization/" rel="bookmark">how to do MySQL Optimization</a></h3><p>myisamchk is used to get information about your database tables or to check, repair, or optimize them. This command can check or repair MyISAM tables. ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2012/02/how-to-do-table-partition-in-mysql/" rel="bookmark">how to do table partition in mysql</a></h3><p>HI all of my php programmer. Mostly MYSQL DBA done the partitioning but if we talk about programmer then they are unable to do. so ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2010/11/reduce-cpu-overhead-problem-by-mysql/" rel="bookmark">How did I reduce CPU overhead problem caused by MySql?</a></h3><p>We were having problem with a project which was shut down in the middle due to heavy traffic. As a technical manager, I was the ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/05/php-mysql-functions-list/" rel="bookmark">PHP Mysql Functions List</a></h3><p>mysql_affected_rows — Get number of affected rows in previous MySQL operation mysql_change_user — Change logged in user of the active connection mysql_client_encoding — Returns the ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/08/php-export-database-schema-as-xml/" rel="bookmark">PHP: Export Database Schema as XML</a></h3><p>Sometimes it can be useful to have a dump of the current database schema. The script below reads the schema from a MySQL database and outputs ...</p></div></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.bageshsingh.com/bagesh-blog/2011/09/how-to-optimize-mysql-query-and-mysql-database/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What does myisamchk do?</title>
		<link>http://www.bageshsingh.com/bagesh-blog/2011/08/what-does-myisamchk-do/</link>
		<comments>http://www.bageshsingh.com/bagesh-blog/2011/08/what-does-myisamchk-do/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 20:00:00 +0000</pubDate>
		<dc:creator>Bagesh Singh</dc:creator>
				<category><![CDATA[Interview Question]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql interview question]]></category>

		<guid isPermaLink="false">http://www.bageshsingh.com/bagesh-blog/?p=1621</guid>
		<description><![CDATA[It compressed the MyISAM tables, which reduces their disk usage. Posts Related to What does myisamchk do? how to do MySQL Optimizationmyisamchk is used to get information about your database tables or to check, repair, or optimize them. This command can check or repair MyISAM tables. ...Explain the difference between MyISAM Static and MyISAM DynamicMyISAM [...]]]></description>
			<content:encoded><![CDATA[<p>It compressed the MyISAM tables, which reduces their disk usage.</p>
<div id="seo_alrp_related"><h2>Posts Related to What does myisamchk do? </h2><ul><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/08/how-to-do-mysql-optimization/" rel="bookmark">how to do MySQL Optimization</a></h3><p>myisamchk is used to get information about your database tables or to check, repair, or optimize them. This command can check or repair MyISAM tables. ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/08/explain-the-difference-between-myisam-static-and-myisam-dynamic/" rel="bookmark">Explain the difference between MyISAM Static and MyISAM Dynamic</a></h3><p>MyISAM static all the fields have fixed width. The Dynamic MyISAM table would include fields such as TEXT, BLOB, etc. to accommodate the data types ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/08/what-is-maximum-size-of-a-database-in-mysql/" rel="bookmark">What is maximum size of a database in MySQL?</a></h3><p>If the operating system or filesystem places a limit on the number of files in a directory, MySQL is bound by that constraint.The efficiency of ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/08/please-explain-frm-myd-myi-in-mysql/" rel="bookmark">Please explain .frm .myd .myi in mysql?</a></h3><p>Each MyISAM table is stored on disk in three files. The files have names that begin with the table name and have an extension to ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2010/11/manage-server-hard-disk-using-php/" rel="bookmark">Manage Server Hard Disk Using PHP</a></h3><p>PHP provides some sweet functions to manage the server's hard disk. Here's how to use them. copy() Copies a file from a source file. $result ...</p></div></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.bageshsingh.com/bagesh-blog/2011/08/what-does-myisamchk-do/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The CHAR and VARCHAR Types</title>
		<link>http://www.bageshsingh.com/bagesh-blog/2011/08/the-char-and-varchar-types/</link>
		<comments>http://www.bageshsingh.com/bagesh-blog/2011/08/the-char-and-varchar-types/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 18:44:17 +0000</pubDate>
		<dc:creator>Bagesh Singh</dc:creator>
				<category><![CDATA[Interview Question]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql interview question]]></category>

		<guid isPermaLink="false">http://www.bageshsingh.com/bagesh-blog/?p=1619</guid>
		<description><![CDATA[the CHAR and VARCHAR types are similar, but differ in the way they are stored and retrieved. As of MySQL 5.0.3, they also differ in maximum length and in whether trailing spaces are retained. The CHAR and VARCHAR types are declared with a length that indicates the maximum number of characters you want to store. [...]]]></description>
			<content:encoded><![CDATA[<p>the CHAR and VARCHAR types are similar, but differ in the way they are stored and retrieved. As of MySQL 5.0.3, they also differ in maximum length and in whether trailing spaces are retained.</p>
<p>The CHAR and VARCHAR types are declared with a length that indicates the maximum number of characters you want to store. For example, CHAR(30) can hold up to 30 characters.</p>
<div id="seo_alrp_related"><h2>Posts Related to The CHAR and VARCHAR Types </h2><ul><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/08/what-is-the-maximum-length-of-a-table-name-database-name-and-fieldname-in-mysql/" rel="bookmark">What is the maximum length of a table name, database name, and fieldname in MySQL?</a></h3><p>The following table describes the maximum length for each type of identifier. Database – 64 bytes Table – 64 bytes Column – 64 bytes Index ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/05/mysql-handling-duplicates/" rel="bookmark">MySQL Handling Duplicates</a></h3><p>Tables or result sets sometimes contain duplicate records. Sometime it is allowed but sometime it is required to stop duplicate records. Sometime it is required ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/05/mysql-string-functions-list/" rel="bookmark">MySQL String Functions list</a></h3><p>Name Description ASCII() Return numeric value of left-most character BIN() Return a string representation of the argument BIT_LENGTH() Return length of argument in bits CHAR_LENGTH() ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/03/boundary-value-analysis-and-equivalence-partitioning-ep/" rel="bookmark">Boundary Value Analysis and Equivalence partitioning (EP)</a></h3><p>Equivalence partitioning (EP) is a test case design technique that is based on the premise that the inputs and outputs of a component can be ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2010/06/list-all-string-functions-in-php-php-string-function-list-is-very-userfull-in-any-language/" rel="bookmark">list all string functions in  php : php String function list is  very userfull in any language</a></h3><p>PHP is very powerful server side programming language. It has lots of powerful functions which speed up the php development and also the performance. While ...</p></div></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.bageshsingh.com/bagesh-blog/2011/08/the-char-and-varchar-types/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Order by vs GROUP By</title>
		<link>http://www.bageshsingh.com/bagesh-blog/2011/08/order-by-vs-group-by/</link>
		<comments>http://www.bageshsingh.com/bagesh-blog/2011/08/order-by-vs-group-by/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 18:43:54 +0000</pubDate>
		<dc:creator>Bagesh Singh</dc:creator>
				<category><![CDATA[Interview Question]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql interview question]]></category>

		<guid isPermaLink="false">http://www.bageshsingh.com/bagesh-blog/?p=1617</guid>
		<description><![CDATA[The easiest explanation is that order by is doing the sorting of a table and the group by clause is used for aggregation of a field. Posts Related to Order by vs GROUP By MySQL GROUP BY ClauseYou can use GROUP BY to group values from a column, and, if you wish, perform calculations on [...]]]></description>
			<content:encoded><![CDATA[<p>The easiest explanation is that order by is doing the sorting of a table and the group by clause is used for aggregation of a field.</p>
<div id="seo_alrp_related"><h2>Posts Related to Order by vs GROUP By </h2><ul><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/05/mysql-group-by-clause/" rel="bookmark">MySQL GROUP BY Clause</a></h3><p>You can use GROUP BY to group values from a column, and, if you wish, perform calculations on that column. You can use COUNT, SUM, ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/05/mysql-handling-duplicates/" rel="bookmark">MySQL Handling Duplicates</a></h3><p>Tables or result sets sometimes contain duplicate records. Sometime it is allowed but sometime it is required to stop duplicate records. Sometime it is required ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2010/05/magento-ecommerce-how-to-reset-all-test-order-information-and-set-unique-prefix-for-orders-invoices-shipments-and-credit-memos/" rel="bookmark">Magento eCommerce: How To Reset All Test Order Information and Set Unique Prefix For Orders, Invoices, Shipments, and Credit Memos</a></h3><p>Nice Post I stumbled upon.. from www.eliasinteractive.com. This is a very helpful hack Lee has posted to reset order information while moving from development stage ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/08/explain-about-the-naming-conventions-in-cakephp-%e2%80%93-cakephp-interview-question/" rel="bookmark">Explain About the Naming Conventions in cakePHP – cakePHP Interview Question</a></h3><p>Table names are plural and lowercased. Model names are singular and CamelCased: ModelName. Model filenames are singular and underscored: model_name.php. Controller names are plural and ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2010/09/paypal-code-in-php-quick-e-commerce-with-php-and-paypal/" rel="bookmark">Paypal code in php : Quick E-Commerce with  PHP and PayPal</a></h3><p>Hard-Coded Information A number of the parameters needed by PayPal can be hard-coded right into your page. For example, the "action" attribute of the "form" ...</p></div></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.bageshsingh.com/bagesh-blog/2011/08/order-by-vs-group-by/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Explain the difference between BOOL, TINYINT and BIT</title>
		<link>http://www.bageshsingh.com/bagesh-blog/2011/08/explain-the-difference-between-bool-tinyint-and-bit/</link>
		<comments>http://www.bageshsingh.com/bagesh-blog/2011/08/explain-the-difference-between-bool-tinyint-and-bit/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 18:43:31 +0000</pubDate>
		<dc:creator>Bagesh Singh</dc:creator>
				<category><![CDATA[Interview Question]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql interview question]]></category>

		<guid isPermaLink="false">http://www.bageshsingh.com/bagesh-blog/?p=1615</guid>
		<description><![CDATA[Prior to MySQL 5.0.3: those are all synonyms. After MySQL 5.0.3: BIT data type can store 8 bytes of data and should be used for binary data. Posts Related to Explain the difference between BOOL, TINYINT and BIT How to optimize mysql query and mysql database?There is lots of way to optimize mysql. once you [...]]]></description>
			<content:encoded><![CDATA[<p>Prior to MySQL 5.0.3: those are all synonyms.</p>
<p>After MySQL 5.0.3: <strong>BIT</strong> data type can store 8 bytes of data and should be used for binary data.</p>
<div id="seo_alrp_related"><h2>Posts Related to Explain the difference between BOOL, TINYINT and BIT </h2><ul><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/09/how-to-optimize-mysql-query-and-mysql-database/" rel="bookmark">How to optimize mysql query and mysql database?</a></h3><p>There is lots of way to optimize mysql. once you optimize your query and database of mysql it will make your website and application very ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/08/explain-the-difference-among-float-double-and-real/" rel="bookmark">Explain the difference Among FLOAT, DOUBLE and REAL</a></h3><p>FLOATs store floating point numbers with 8 place accuracy and take up 4 bytes. DOUBLEs store floating point numbers with 16 place accuracy and take ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/08/what-is-the-maximum-length-of-a-table-name-database-name-and-fieldname-in-mysql/" rel="bookmark">What is the maximum length of a table name, database name, and fieldname in MySQL?</a></h3><p>The following table describes the maximum length for each type of identifier. Database – 64 bytes Table – 64 bytes Column – 64 bytes Index ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2010/11/reduce-cpu-overhead-problem-by-mysql/" rel="bookmark">How did I reduce CPU overhead problem caused by MySql?</a></h3><p>We were having problem with a project which was shut down in the middle due to heavy traffic. As a technical manager, I was the ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/08/please-explain-frm-myd-myi-in-mysql/" rel="bookmark">Please explain .frm .myd .myi in mysql?</a></h3><p>Each MyISAM table is stored on disk in three files. The files have names that begin with the table name and have an extension to ...</p></div></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.bageshsingh.com/bagesh-blog/2011/08/explain-the-difference-between-bool-tinyint-and-bit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How many values can the SET function of MySQL take?</title>
		<link>http://www.bageshsingh.com/bagesh-blog/2011/08/how-many-values-can-the-set-function-of-mysql-take/</link>
		<comments>http://www.bageshsingh.com/bagesh-blog/2011/08/how-many-values-can-the-set-function-of-mysql-take/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 18:43:11 +0000</pubDate>
		<dc:creator>Bagesh Singh</dc:creator>
				<category><![CDATA[Interview Question]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql interview question]]></category>

		<guid isPermaLink="false">http://www.bageshsingh.com/bagesh-blog/?p=1613</guid>
		<description><![CDATA[MySQL set can take zero or more values but at the maximum it can Posts Related to How many values can the SET function of MySQL take? how to do table partition in mysqlHI all of my php programmer. Mostly MYSQL DBA done the partitioning but if we talk about programmer then they are unable [...]]]></description>
			<content:encoded><![CDATA[<p>MySQL set can take zero or more values but at the maximum it can</p>
<div id="seo_alrp_related"><h2>Posts Related to How many values can the SET function of MySQL take? </h2><ul><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2012/02/how-to-do-table-partition-in-mysql/" rel="bookmark">how to do table partition in mysql</a></h3><p>HI all of my php programmer. Mostly MYSQL DBA done the partitioning but if we talk about programmer then they are unable to do. so ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/08/what-is-maximum-size-of-a-database-in-mysql/" rel="bookmark">What is maximum size of a database in MySQL?</a></h3><p>If the operating system or filesystem places a limit on the number of files in a directory, MySQL is bound by that constraint.The efficiency of ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/09/how-to-optimize-mysql-query-and-mysql-database/" rel="bookmark">How to optimize mysql query and mysql database?</a></h3><p>There is lots of way to optimize mysql. once you optimize your query and database of mysql it will make your website and application very ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/05/mysql-handling-duplicates/" rel="bookmark">MySQL Handling Duplicates</a></h3><p>Tables or result sets sometimes contain duplicate records. Sometime it is allowed but sometime it is required to stop duplicate records. Sometime it is required ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/05/mysql-group-by-clause/" rel="bookmark">MySQL GROUP BY Clause</a></h3><p>You can use GROUP BY to group values from a column, and, if you wish, perform calculations on that column. You can use COUNT, SUM, ...</p></div></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.bageshsingh.com/bagesh-blog/2011/08/how-many-values-can-the-set-function-of-mysql-take/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How can I load data from a text file into a table?</title>
		<link>http://www.bageshsingh.com/bagesh-blog/2011/08/how-can-i-load-data-from-a-text-file-into-a-table/</link>
		<comments>http://www.bageshsingh.com/bagesh-blog/2011/08/how-can-i-load-data-from-a-text-file-into-a-table/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 18:42:49 +0000</pubDate>
		<dc:creator>Bagesh Singh</dc:creator>
				<category><![CDATA[Interview Question]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql interview question]]></category>

		<guid isPermaLink="false">http://www.bageshsingh.com/bagesh-blog/?p=1611</guid>
		<description><![CDATA[We can use LOAD DATA INFILE file_name; syntax to load data from a text file. but we have to make sure that a) data is delimited b) columns and data matched correctly Posts Related to How can I load data from a text file into a table?Reading the &#8220;clean&#8221; text from DOCX and ODTIn this [...]]]></description>
			<content:encoded><![CDATA[<p>We can use LOAD DATA INFILE file_name; syntax to load data from a text file. but we have to make sure that</p>
<p>a) data is delimited</p>
<p>b) columns and data matched correctly</p>
<div id="seo_alrp_related"><h2>Posts Related to How can I load data from a text file into a table?</h2><ul><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/08/reading-the-clean-text-from-docx-and-odt/" rel="bookmark">Reading the &#8220;clean&#8221; text from DOCX and ODT</a></h3><p>In this article we will resolve the task of reading the “clean” text from the Office Open XML (more known as DOCX) and OpenDocument Format ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2010/11/create-a-csv-file-from-mysql-with-php/" rel="bookmark">Create a CSV file from MySQL with PHP</a></h3><p>There are a couple of ways to export data from MySQL to a CSV file but neither of them supports adding a header row to ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/03/design-and-run-time-data-table/" rel="bookmark">Design and run-time data table</a></h3><p>Design time data table As the name suggest the data table during the script design time is know as design time data table. Any changes ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2010/11/how-to-validate-data-without-saving-in-cakephp/" rel="bookmark">How To Validate data Without Saving? in Cakephp</a></h3><p>You know, CakePHP check data only when you saving: $this -&gt; User -&gt; save ($this-&gt;data) But if you do not needing to save data? In ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/08/reading-the-clean-text-from-pdf-with-php/" rel="bookmark">Reading the &#8220;clean&#8221; text from PDF with PHP</a></h3><p>Portable Document Format (PDF) is a file format created for the document exchange. Each PDF file encapsulates a complete description of a fixed-layout 2D document ...</p></div></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.bageshsingh.com/bagesh-blog/2011/08/how-can-i-load-data-from-a-text-file-into-a-table/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How can we know the number of days between two given dates using MySQL?</title>
		<link>http://www.bageshsingh.com/bagesh-blog/2011/08/how-can-we-know-the-number-of-days-between-two-given-dates-using-mysql/</link>
		<comments>http://www.bageshsingh.com/bagesh-blog/2011/08/how-can-we-know-the-number-of-days-between-two-given-dates-using-mysql/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 18:42:28 +0000</pubDate>
		<dc:creator>Bagesh Singh</dc:creator>
				<category><![CDATA[Interview Question]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql interview question]]></category>

		<guid isPermaLink="false">http://www.bageshsingh.com/bagesh-blog/?p=1609</guid>
		<description><![CDATA[SELECT DATEDIFF(’2007-03-07′,’2005-01-01′); Posts Related to How can we know the number of days between two given dates using MySQL? Finding difference of days between two dates in PHPYesterday, my friend Roshan was was struggling to find the days difference between to two dates in PHP. Well, after a while I came up ...MySQL Date and [...]]]></description>
			<content:encoded><![CDATA[<p>SELECT DATEDIFF(’2007-03-07′,’2005-01-01′);</p>
<div id="seo_alrp_related"><h2>Posts Related to How can we know the number of days between two given dates using MySQL? </h2><ul><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2010/03/finding-difference-of-days-between-two-dates-in-php/" rel="bookmark">Finding difference of days between two dates in PHP</a></h3><p>Yesterday, my friend Roshan was was struggling to find the days difference between to two dates in PHP. Well, after a while I came up ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/05/mysql-date-and-time-functions/" rel="bookmark">MySQL Date and Time Functions</a></h3><p>Name Description ADDDATE() Add dates ADDTIME() Add time CONVERT_TZ() Convert from one timezone to another CURDATE() Return the current date CURRENT_DATE(), CURRENT_DATE Synonyms for CURDATE() ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/05/mysql-group-by-clause/" rel="bookmark">MySQL GROUP BY Clause</a></h3><p>You can use GROUP BY to group values from a column, and, if you wish, perform calculations on that column. You can use COUNT, SUM, ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/02/jquery-ui-datepicker-date-range/" rel="bookmark">jQuery UI DatePicker Date Range</a></h3><p>In this post, I will show you how to specify Date Range for the jQuery UI DatePicker control, using the maxDate and minDate options. The ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/09/how-to-optimize-mysql-query-and-mysql-database/" rel="bookmark">How to optimize mysql query and mysql database?</a></h3><p>There is lots of way to optimize mysql. once you optimize your query and database of mysql it will make your website and application very ...</p></div></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.bageshsingh.com/bagesh-blog/2011/08/how-can-we-know-the-number-of-days-between-two-given-dates-using-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What is the maximum length of a table name, database name, and fieldname in MySQL?</title>
		<link>http://www.bageshsingh.com/bagesh-blog/2011/08/what-is-the-maximum-length-of-a-table-name-database-name-and-fieldname-in-mysql/</link>
		<comments>http://www.bageshsingh.com/bagesh-blog/2011/08/what-is-the-maximum-length-of-a-table-name-database-name-and-fieldname-in-mysql/#comments</comments>
		<pubDate>Mon, 29 Aug 2011 18:41:58 +0000</pubDate>
		<dc:creator>Bagesh Singh</dc:creator>
				<category><![CDATA[Interview Question]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[mysql interview question]]></category>

		<guid isPermaLink="false">http://www.bageshsingh.com/bagesh-blog/?p=1607</guid>
		<description><![CDATA[The following table describes the maximum length for each type of identifier. Database – 64 bytes Table – 64 bytes Column – 64 bytes Index – 64 bytes Alias – 255 bytes There are some restrictions on the characters that may appear in identifiers: Posts Related to What is the maximum length of a table [...]]]></description>
			<content:encoded><![CDATA[<p>The following table describes the maximum length for each type of identifier.</p>
<p><strong>Database</strong> – 64 bytes<br />
<strong>Table</strong> – 64 bytes<br />
<strong>Column</strong> – 64 bytes<br />
<strong>Index</strong> – 64 bytes<br />
<strong>Alias</strong> – 255 bytes</p>
<p>There are some restrictions on the characters that may appear in identifiers:</p>
<div id="seo_alrp_related"><h2>Posts Related to What is the maximum length of a table name, database name, and fieldname in MySQL? </h2><ul><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/08/what-is-maximum-size-of-a-database-in-mysql/" rel="bookmark">What is maximum size of a database in MySQL?</a></h3><p>If the operating system or filesystem places a limit on the number of files in a directory, MySQL is bound by that constraint.The efficiency of ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/08/explain-the-difference-among-float-double-and-real/" rel="bookmark">Explain the difference Among FLOAT, DOUBLE and REAL</a></h3><p>FLOATs store floating point numbers with 8 place accuracy and take up 4 bytes. DOUBLEs store floating point numbers with 16 place accuracy and take ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/08/explain-the-difference-between-bool-tinyint-and-bit/" rel="bookmark">Explain the difference between BOOL, TINYINT and BIT</a></h3><p>Prior to MySQL 5.0.3: those are all synonyms. After MySQL 5.0.3: BIT data type can store 8 bytes of data and should be used for ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2010/11/manage-server-hard-disk-using-php/" rel="bookmark">Manage Server Hard Disk Using PHP</a></h3><p>PHP provides some sweet functions to manage the server's hard disk. Here's how to use them. copy() Copies a file from a source file. $result ...</p></div></li><li><div class="seo_alrp_rl_content"><h3><a href="http://www.bageshsingh.com/bagesh-blog/2011/08/the-char-and-varchar-types/" rel="bookmark">The CHAR and VARCHAR Types</a></h3><p>the CHAR and VARCHAR types are similar, but differ in the way they are stored and retrieved. As of MySQL 5.0.3, they also differ in ...</p></div></li></ul></div>]]></content:encoded>
			<wfw:commentRss>http://www.bageshsingh.com/bagesh-blog/2011/08/what-is-the-maximum-length-of-a-table-name-database-name-and-fieldname-in-mysql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

