<?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>NewPush &#187; MySQL</title> <atom:link href="http://newpush.com/tag/mysql/feed/" rel="self" type="application/rss+xml" /><link>http://newpush.com</link> <description>Server Hosting, Data Warehouse Hosting, Collaboration</description> <lastBuildDate>Mon, 30 Jan 2012 15:40:45 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <item><title>Updating the Rate Sheet in the COGEXO Rating Engine</title><link>http://newpush.com/2010/11/updating-the-rate-sheet-in-the-cogexo-rating-engine/</link> <comments>http://newpush.com/2010/11/updating-the-rate-sheet-in-the-cogexo-rating-engine/#comments</comments> <pubDate>Wed, 10 Nov 2010 01:41:05 +0000</pubDate> <dc:creator>Pete</dc:creator> <category><![CDATA[Business Intelligence]]></category> <category><![CDATA[DB2]]></category> <category><![CDATA[MySQL]]></category><guid isPermaLink="false">http://newpush.com/?p=855</guid> <description><![CDATA[Rate table update on MySQL backed database The concepts in this guide apply for the DB2 version of the rating engine. Data Fromat product_code_call,description,cost,call_type Data Upload For the MySQL back-end, use phpMyAdmin to upload the data: Log in to phpMyAdmin &#8230; <a href="http://newpush.com/2010/11/updating-the-rate-sheet-in-the-cogexo-rating-engine/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<h1>Rate table update on MySQL backed database</h1><p> The concepts in this guide apply for the DB2 version of the rating engine.</p><h2>Data Fromat</h2><p><code>product_code_call,description,cost,call_type</code></p><h2>Data Upload</h2><p>For the MySQL back-end, use phpMyAdmin to upload the data:</p><ul><ol>Log in to phpMyAdmin</ol><ol>Select the <code>rate</code> table</ol><ol>Click the <code>import</code> tab</ol><ol>Select the file that has the comma delimited values (CSV)</ol><ol>Set the number of lines to skip to 1</ol><ol>Select CSV radio button</ol><ol>Set the delimiter to &#8220;,&#8221;</ol><ol>Check the <code>replace data with file</code> box</ol><ol>Click Go</ol></ul><p>Upon successful import, a message diplaying the number of values imported, for example:<code><br /> Import has been successfully finished, 1578 queries executed.</code></p> ]]></content:encoded> <wfw:commentRss>http://newpush.com/2010/11/updating-the-rate-sheet-in-the-cogexo-rating-engine/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How to delete records with duplicate fields, such as dupplicate emails?</title><link>http://newpush.com/2009/05/how-to-delete-records-with-duplicate-fields-such-as-dupplicate-emails/</link> <comments>http://newpush.com/2009/05/how-to-delete-records-with-duplicate-fields-such-as-dupplicate-emails/#comments</comments> <pubDate>Mon, 04 May 2009 02:09:32 +0000</pubDate> <dc:creator>Balazs</dc:creator> <category><![CDATA[DB2]]></category> <category><![CDATA[IBM]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[Oracle]]></category> <category><![CDATA[PostgreSQL]]></category><guid isPermaLink="false">http://www.wdream.com/?p=166</guid> <description><![CDATA[To delete records where only a field is duplicated, we can use a similar technique to the general duplicate removal technique: CREATE TABLE temp AS SELECT DISTINCT ON (email) * FROM table_to_deduplicate; DROP TABLE table_to_deduplicate; ALTER TABLE temp RENAME TO &#8230; <a href="http://newpush.com/2009/05/how-to-delete-records-with-duplicate-fields-such-as-dupplicate-emails/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>To delete records where only a field is duplicated, we can use a similar technique to the general duplicate removal technique:</p><pre>
CREATE TABLE temp AS SELECT DISTINCT ON (email) * FROM table_to_deduplicate;
DROP TABLE table_to_deduplicate;
ALTER TABLE temp RENAME TO table_to_deduplicate;
</pre><p>Be mindful of the fact that this process will not preserve the constraints on the original table. So if you have indexes, NOT NULL attributes, primary keys, foreign keys, you&#8217;ll have to recreate them.</p> ]]></content:encoded> <wfw:commentRss>http://newpush.com/2009/05/how-to-delete-records-with-duplicate-fields-such-as-dupplicate-emails/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>How to delete dupplicate records in DB2, Oracle, MySQL, and PostgreSQL</title><link>http://newpush.com/2009/05/how-to-delete-dupplicate-records-in-db2-oracle-mysql-and-postgresql/</link> <comments>http://newpush.com/2009/05/how-to-delete-dupplicate-records-in-db2-oracle-mysql-and-postgresql/#comments</comments> <pubDate>Mon, 04 May 2009 02:06:59 +0000</pubDate> <dc:creator>Balazs</dc:creator> <category><![CDATA[DB2]]></category> <category><![CDATA[IBM]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[Oracle]]></category> <category><![CDATA[PostgreSQL]]></category><guid isPermaLink="false">http://www.wdream.com/?p=164</guid> <description><![CDATA[To delete dupplicate records in SQL, the following sequence of commands will do the trick: CREATE TABLE temp AS SELECT DISTINCT * FROM table_to_deduplicate; DROP TABLE table_to_deduplicate; ALTER TABLE temp RENAME TO table_to_deduplicate; Be mindful of the fact that this &#8230; <a href="http://newpush.com/2009/05/how-to-delete-dupplicate-records-in-db2-oracle-mysql-and-postgresql/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>To delete dupplicate records in SQL, the following sequence of commands will do the trick:</p><pre>
CREATE TABLE temp AS SELECT DISTINCT * FROM table_to_deduplicate;
DROP TABLE table_to_deduplicate;
ALTER TABLE temp RENAME TO table_to_deduplicate;
</pre><p>Be mindful of the fact that this process will not preserve the constraints on the original table. So if you have indexes, NOT NULL attributes, primary keys, foreign keys, you&#8217;ll have to recreate them.</p> ]]></content:encoded> <wfw:commentRss>http://newpush.com/2009/05/how-to-delete-dupplicate-records-in-db2-oracle-mysql-and-postgresql/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Which MySQL database engine to pick for a given table?</title><link>http://newpush.com/2009/05/which-mysql-database-engine-to-pick-for-a-given-table/</link> <comments>http://newpush.com/2009/05/which-mysql-database-engine-to-pick-for-a-given-table/#comments</comments> <pubDate>Fri, 01 May 2009 08:44:09 +0000</pubDate> <dc:creator>Balazs</dc:creator> <category><![CDATA[AIX]]></category> <category><![CDATA[Data Warehouse]]></category> <category><![CDATA[DB2]]></category> <category><![CDATA[Dedicated Servers]]></category> <category><![CDATA[Hosting Support]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Mac OS X]]></category> <category><![CDATA[Managed Hosting]]></category> <category><![CDATA[OpenBSD]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[MySQL]]></category><guid isPermaLink="false">http://www.wdream.com/?p=146</guid> <description><![CDATA[MySQL allows to select a different king of engine on a per table basis at creation time of each table. Each engine has its advantages and caveats. Here is a brief summary: MyISAM: fastest disk based, least space requirement, non-transactional, &#8230; <a href="http://newpush.com/2009/05/which-mysql-database-engine-to-pick-for-a-given-table/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>MySQL allows to select a different king of engine on a per table basis at creation time of each table.  Each engine has its advantages and caveats.  Here is a brief summary:</p><ul><li>MyISAM: fastest disk based, least space requirement, non-transactional, slow crash recovery</li><li>InnoDB: slowest engine, transactional, fastest crash recovery</li><li>HEAP:fastest overall engine, limited by  live memory, limited attribute types, no crash recovery</li></ul><p>References:</p><ul><li><a href="http://www.mysql.com/news-and-events/newsletter/2002-12/a0000000091.html">Which Storage Engine (table handler) to use?</a></li></ul> ]]></content:encoded> <wfw:commentRss>http://newpush.com/2009/05/which-mysql-database-engine-to-pick-for-a-given-table/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>MySQL default values on INSERT</title><link>http://newpush.com/2009/05/mysql-default-values-on-insert/</link> <comments>http://newpush.com/2009/05/mysql-default-values-on-insert/#comments</comments> <pubDate>Fri, 01 May 2009 08:32:13 +0000</pubDate> <dc:creator>Balazs</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[MySQL]]></category><guid isPermaLink="false">http://www.wdream.com/?p=144</guid> <description><![CDATA[When inserting into regular database systems, like Oracle, DB2, and even PostgreSQL, the omitted attributes from an INSERT are automatically set to default. Not so with MyISAM tables on MySQL. The syntax required by MySQL for an implicit default when &#8230; <a href="http://newpush.com/2009/05/mysql-default-values-on-insert/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<ul><li></li></ul><p>When inserting into regular database systems, like Oracle, DB2, and even PostgreSQL, the omitted attributes from an INSERT are automatically set to default.  Not so with MyISAM tables on MySQL.  The syntax required by MySQL for an implicit default when multiple attributes are inserted is <code>DEFAULT</code>.  For example:</p><pre>INSERT INTO my_table VALUES (?,?,DEFAULT,?,DEFAULT)</pre><p>will set the third and fifth parameters to default values.</p><p>Note that this has been only tested with the JDBC driver, and other database drivers might behave differently.</p><p>References:</p><ul><li><a href="http://dev.mysql.com/doc/refman/5.0/en/data-type-defaults.html">MySQL 5.0 Reference Manual</a></li></ul> ]]></content:encoded> <wfw:commentRss>http://newpush.com/2009/05/mysql-default-values-on-insert/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Increase maximum table space in MySQL</title><link>http://newpush.com/2009/01/increase-maximum-table-space-in-mysql/</link> <comments>http://newpush.com/2009/01/increase-maximum-table-space-in-mysql/#comments</comments> <pubDate>Sun, 04 Jan 2009 05:01:55 +0000</pubDate> <dc:creator>Balazs</dc:creator> <category><![CDATA[AIX]]></category> <category><![CDATA[Data Warehouse]]></category> <category><![CDATA[Dedicated Servers]]></category> <category><![CDATA[Hosting Support]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Mac OS X]]></category> <category><![CDATA[Managed Hosting]]></category> <category><![CDATA[OpenBSD]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[MySQL]]></category><guid isPermaLink="false">http://www.wdream.com/archives/24</guid> <description><![CDATA[For those of us that are still forced to used 32bit MySQL, there is a table size limit of 4GB by default (even though the file size limit on those systems is 4TB on ext3 &#8211; 2TB on NTFS).  Here &#8230; <a href="http://newpush.com/2009/01/increase-maximum-table-space-in-mysql/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>For those of us that are still forced to used 32bit MySQL, there is a table size limit of 4GB by default (even though the file size limit on those systems is 4TB on ext3 &#8211; 2TB on NTFS).  Here is what to do to lift that limit:</p><pre class="programlisting">ALTER TABLE <em class="replaceable"><code>tbl_name</code></em> MAX_ROWS=1000000000 AVG_ROW_LENGTH=<em class="replaceable"><code>nnn</code></em>;</pre><p>You have to specify <code class="literal">AVG_ROW_LENGTH</code> only for tables with <a title="10.4.3. The BLOB and&lt;br &gt;&lt;/a&gt; TEXT Types" href="http://dev.mysql.com/doc/refman/5.0/en/blob.html"><code class="literal">BLOB</code></a> or <a title="10.4.3. The BLOB and&lt;br &gt;&lt;/a&gt; TEXT Types" href="http://dev.mysql.com/doc/refman/5.0/en/blob.html"><code class="literal">TEXT</code></a> columns; in this case, MySQL can&#8217;t optimize the space required based only on the number of rows.</p><p>If you want to make the default larger, then you can set the mysqld engine parameter <code>myisam_data_pointer_size = 7</code> in <code>/etc/my.cnf</code> (or whereever your MySQL server config file is).  The setting of 7 will allow 256TB table size.</p><p>References:</p><ol><li><a href="http://www.vbulletin.com/forum/archive/index.php/t-226110.html">Vbulletin Community Forum</a></li><li><a href="http://dev.mysql.com/doc/refman/5.0/en/full-table.html">MySQL 5.0 Reference Manual</a></li><li><a href="http://jeremy.zawodny.com/blog/archives/000796.html">Overcoming MySQL&#8217;s 4GB Limit</a></li></ol> ]]></content:encoded> <wfw:commentRss>http://newpush.com/2009/01/increase-maximum-table-space-in-mysql/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Export MySQL table as csv file</title><link>http://newpush.com/2009/01/export-mysql-table-as-csv-file/</link> <comments>http://newpush.com/2009/01/export-mysql-table-as-csv-file/#comments</comments> <pubDate>Sun, 04 Jan 2009 04:50:38 +0000</pubDate> <dc:creator>Balazs</dc:creator> <category><![CDATA[Data Warehouse]]></category> <category><![CDATA[Dedicated Servers]]></category> <category><![CDATA[Hosting Support]]></category> <category><![CDATA[Managed Hosting]]></category> <category><![CDATA[csv]]></category> <category><![CDATA[MySQL]]></category><guid isPermaLink="false">http://www.wdream.com/archives/23</guid> <description><![CDATA[Exporting from an RDBMS always depends on the syntax of the specific RDBMS in question.&#160; For MySQL, here is how to transform a SELECT statement into a CSV export: SELECT a,b INTO OUTFILE '/tmp/result.csv' FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED &#8230; <a href="http://newpush.com/2009/01/export-mysql-table-as-csv-file/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>Exporting from an RDBMS always depends on the syntax of the specific RDBMS in question.&nbsp; For MySQL, here is how to transform a SELECT statement into a CSV export:</p><pre class="programlisting">SELECT a,b INTO OUTFILE '/tmp/result.csv'  FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"'  LINES TERMINATED BY 'n'  FROM test_table;</pre><p>Reference: <a href="http://dev.mysql.com/doc/refman/5.0/en/select.html">MySQL 5.0 Reference Manual</a></p> ]]></content:encoded> <wfw:commentRss>http://newpush.com/2009/01/export-mysql-table-as-csv-file/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Drop Index in MySQL takes forever</title><link>http://newpush.com/2009/01/drop-index-in-mysql-takes-forever/</link> <comments>http://newpush.com/2009/01/drop-index-in-mysql-takes-forever/#comments</comments> <pubDate>Sun, 04 Jan 2009 04:39:16 +0000</pubDate> <dc:creator>Balazs</dc:creator> <category><![CDATA[Data Warehouse]]></category> <category><![CDATA[Dedicated Servers]]></category> <category><![CDATA[Hosting Support]]></category> <category><![CDATA[Managed Hosting]]></category> <category><![CDATA[drop index]]></category> <category><![CDATA[myisamchk]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[SQL]]></category><guid isPermaLink="false">http://www.wdream.com/archives/22</guid> <description><![CDATA[Even though for our core systems we have migrated most databases to DB2, we still have to deal with MySQL for some side systems, such as CRM, Blog, etc. &#160; One of the MySQL features that I recently noticed is &#8230; <a href="http://newpush.com/2009/01/drop-index-in-mysql-takes-forever/">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description> <content:encoded><![CDATA[<p>Even though for our core systems we have migrated most databases to DB2, we still have to deal with MySQL for some side systems, such as CRM, Blog, etc. &nbsp; One of the MySQL features that I recently noticed is that dropping indexes on sizable tables takes forever.&nbsp; That is apparently due to a convoluted indexing process in MySQL.&nbsp; The workaround was found here: <a href="http://lists.mysql.com/mysql/202489">MySQL General Discussion List</a></p><p>It goes as follows:<pre>1) create table T1 like T;This creates an empty table T1 with indexes ndx1,ndx2,ndx3 and ndx4.2) alter table T1 drop index ndx3;This drops index ndx3 on the empty T1, which should be instantaneous.3) insert into T1 select * from T;This will populate table T and load all three(3) indexes for T1 in one pass.4) drop table table T;5) alter table T1 rename to T;</pre><p> An alternative ugly hack is to start the drop index, kill the database server.&nbsp; That will crash the table on which the drop index was.&nbsp; The crashed table can be recovered by running mysiamchk.</p> ]]></content:encoded> <wfw:commentRss>http://newpush.com/2009/01/drop-index-in-mysql-takes-forever/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
<!-- Served from: newpush.com @ 2012-02-09 09:23:49 by W3 Total Cache -->
