<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
    <channel>
        <title>MySQL Forums - MyISAM</title>
        <description>Forum for MyISAM Storage Engine.</description>
        <link>http://forums.mysql.com/list.php?21</link>
        <lastBuildDate>Sat, 25 May 2013 12:06:48 +0000</lastBuildDate>
        <generator>Phorum 5.2.19</generator>
        <item>
            <guid>http://forums.mysql.com/read.php?21,581974,581974#msg-581974</guid>
            <title>why bigger index of ascii than utf8? (2 replies)</title>
            <link>http://forums.mysql.com/read.php?21,581974,581974#msg-581974</link>
            <description><![CDATA[ Hello all,<br />
<br />
I compared the size of index file of MyISAM<br />
with charset=ascii and utf8,<br />
as the followings:<br />
<br />
<br />
create table TESTT_ASCII_test1 (<br />
  pid int,<br />
  pcode char(11),<br />
  primary key(pid, pcode)<br />
) ENGINE=MyISAM DEFAULT CHARSET=ascii;<br />
<br />
load data local infile 'test.dat'<br />
  into table TESTT_ASCII_test1;<br />
flush table TESTT_ASCII_test1;<br />
<br />
create table TESTT_UTF8_test1 (<br />
  pid int,<br />
  pcode char(11),<br />
  primary key(pid, pcode)<br />
) ENGINE=MyISAM DEFAULT CHARSET=utf8;<br />
load data local infile 'test.dat'<br />
  into table TESTT_UTF8_test1;<br />
flush table TESTT_UTF8_test1;<br />
<br />
The 'test.dat' is:<br />
1       A0000000001<br />
1       A0000000002<br />
1       A0000000003<br />
  ...<br />
1       A0000100000<br />
<br />
Then sizes of MyISAM files are:<br />
<br />
# ls -l TESTT_*<br />
-rw-rw---- 1 mysql mysql 1600000 Mar 21 11:06 TESTT_ASCII_test1.MYD<br />
-rw-rw---- 1 mysql mysql 2350080 Mar 21 11:06 TESTT_ASCII_test1.MYI<br />
-rw-rw---- 1 mysql mysql    8590 Mar 21 11:06 TESTT_ASCII_test1.frm<br />
-rw-rw---- 1 mysql mysql 3800000 Mar 21 11:06 TESTT_UTF8_test1.MYD<br />
-rw-rw---- 1 mysql mysql  852992 Mar 21 11:06 TESTT_UTF8_test1.MYI<br />
-rw-rw---- 1 mysql mysql    8590 Mar 21 11:06 TESTT_UTF8_test1.frm<br />
<br />
<br />
Why is the size of TESTT_ASCII_test1.MYI<br />
larger than TESTT_UTF8_test1.MYI ,<br />
and which is better performance?<br />
<br />
In the case that the primary key has only pcode,<br />
these files were the same size.<br />
<br />
(MySQL version is 5.6.10, OS version is CentOS 6.3)<br />
<br />
Thanks.<br />
Kohama]]></description>
            <dc:creator>武士 小浜</dc:creator>
            <category>MyISAM</category>
            <pubDate>Sun, 24 Mar 2013 06:29:25 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,580506,580506#msg-580506</guid>
            <title>Mysql group by returns wrong result (5 replies)</title>
            <link>http://forums.mysql.com/read.php?21,580506,580506#msg-580506</link>
            <description><![CDATA[ I have an issue in one of mySql query. Issue is not reproducible on any of our local machines. I have a simple query<br />
<br />
SELECT ID <br />
FROM TABLE_NAME <br />
WHERE ID IN (15920,15921) <br />
GROUP BY ID  <br />
<br />
returns result –<br />
<br />
ID<br />
15920<br />
<br />
Which is unexpected result since there is data for both the ids in database.<br />
<br />
Using explain command returned the following result for this query<br />
<br />
+----+-------------+------------+-------+--------------------+--------------------+---------+-----+------+---------------------------------------+<br />
| id | select_type | table      | type  | possible_keys      | Key                | key_len | Ref | rows | Extra                                 |<br />
+----+-------------+------------+-------+--------------------+--------------------+---------+-----+------+---------------------------------------+<br />
|  1 | SIMPLE      | TABLE_NAME | range | CUST_SID_SRUN_INDX | CUST_SID_SRUN_INDX |       4 |     |    1 | Using where; Using index for group-by |<br />
+----+-------------+------------+-------+--------------------+--------------------+---------+-----+------+---------------------------------------+<br />
<br />
For this issue I have tried following solutions -<br />
<br />
• Forcing a derived table –<br />
<br />
SELECT ID<br />
FROM (SELECT ID <br />
      FROM TABLE_NAME <br />
      WHERE ID IN (15920,15921)) CUST <br />
GROUP BY ID<br />
<br />
• Using having clause instead of where clause<br />
<br />
SELECT ID <br />
FROM TABLE_NAME<br />
GROUP BY ID <br />
HAVING ID IN (15920,15921)<br />
<br />
• Ignoring the index used in this table –<br />
<br />
SELECT ID <br />
FROM TABLE_NAME IGNORE INDEX (CUST_SID_SRUN_INDX)  <br />
WHERE ID IN (15920,15921) <br />
GROUP BY ID<br />
<br />
All the above queries return the expected result as follow :-<br />
<br />
ID<br />
15920<br />
15921<br />
<br />
I am trying to analyze the unexpected behavior of group by clause when indexes are used. Please let me know if I could try something else. FYI…The UAT box where the issue occurs is a linux machine with Mysql 5.1.30. The difference that we see is the version of Mysql. We are using Mysql 5.1.52 on our machines. The table which has this issue uses MyISAM databse engine.<br />
<br />
Index definition for the table is <br />
<br />
Table	Non_unique	Key_name	Seq_in_index	Column_name	Collation	Cardinality	Sub_part	Packed	Null	Index_type	Comment<br />
rm_st_ex_customer	1	CUST_SID_SRUN_INDX	1	SIMULATION_ID	A	68				BTREE	<br />
rm_st_ex_customer	1	CUST_SID_SRUN_INDX	2	SIMULATION_RUN	A	428				BTREE	<br />
<br />
<br />
Please let me know if any other input is required.]]></description>
            <dc:creator>Pradeep kumar</dc:creator>
            <category>MyISAM</category>
            <pubDate>Tue, 26 Mar 2013 06:25:43 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,579587,579587#msg-579587</guid>
            <title>After creating a big amount of temporary tables I get this message: Can't create table 'table_name' (errno: 22)  the binary log entry just before getting the error :  DROP /*!40005 TEMPORARY */ TABLE IF EXISTS... (1 reply)</title>
            <link>http://forums.mysql.com/read.php?21,579587,579587#msg-579587</link>
            <description><![CDATA[ After creating a big amount of temporary tables I get this message: Can't create table 'table_name' (errno: 22)<br />
<br />
the binary log entry just before getting the error :<br />
<br />
DROP /*!40005 TEMPORARY */ TABLE IF EXISTS...<br />
<br />
Please reply fast i am waiting]]></description>
            <dc:creator>jani killer</dc:creator>
            <category>MyISAM</category>
            <pubDate>Sun, 24 Feb 2013 01:01:07 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,578934,578934#msg-578934</guid>
            <title>MyISAM index issue (1 reply)</title>
            <link>http://forums.mysql.com/read.php?21,578934,578934#msg-578934</link>
            <description><![CDATA[ Hi <br />
<br />
I was wondering if anyone can point me in the right direction. I have a problem on 5.1.66 running on Centos 6. <br />
<br />
Any MyISAM table which is indexed creates a  *.MYI fil 1GB in size even if the index is only a few kb. Well when I say 1GB in size, that's the reported size using du or dk however ls reports the correct size.<br />
<br />
At first I thought this might be a operating system / FS issue but when I optimized one of the affected tables the problem went away..until it was re-indexed.<br />
<br />
Any help on this matter would be really appreciated as I've spent most of the day trying to figure this out.<br />
<br />
Regards<br />
<br />
Wayne]]></description>
            <dc:creator>Wayne Clancy</dc:creator>
            <category>MyISAM</category>
            <pubDate>Tue, 12 Feb 2013 16:08:16 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,578818,578818#msg-578818</guid>
            <title>issue with myisam (1 reply)</title>
            <link>http://forums.mysql.com/read.php?21,578818,578818#msg-578818</link>
            <description><![CDATA[ Hi,<br />
<br />
Just got the below error in one of the slave .<br />
I just googled it and changed the variable &quot;myisam_data_pointer_size&quot; from 4 to 6.<br />
some how my alter was sucessful.<br />
Can you please let me know whther my approch was right .. i am not sure on this variable.<br />
will this cause any performance issue.<br />
should i roll back it ?<br />
<br />
<br />
130208  9:40:19 [ERROR] Slave: Error 'The table '#sql-19fc_3f8acc6' is full' on query. Default database: 'registry'. Query: 'alter table enom_log_2012_12_03 add responsedatatype char(1) not null after requestdata', Error_code: 1114<br />
130208  9:40:19 [ERROR] Error running query, slave SQL thread aborted. Fix the problem, and restart the slave SQL thread with &quot;SLAVE START&quot;. We stopped at log 'pumpkin-bin.008662' position 411952695<br />
Problem Description:-<br />
Check for the Alerts in Errorlog for any errors and failures.Check if Mysql is up? if not verify if the process was Normal shutdown.<br />
Advice:-<br />
<br />
mysql&gt; SHOW TABLE STATUS FROM registry LIKE 'enom_log_2012_12_03'\G<br />
*************************** 1. row ***************************<br />
           Name: enom_log_2012_12_03<br />
         Engine: MyISAM<br />
        Version: 9<br />
     Row_format: Dynamic<br />
           Rows: 1786679<br />
 Avg_row_length: 2403<br />
    Data_length: 4293600396<br />
Max_data_length: 4294967295<br />
   Index_length: 60999680<br />
      Data_free: 0<br />
 Auto_increment: 1786680<br />
    Create_time: 2013-02-06 15:19:07<br />
    Update_time: 2013-02-06 15:22:16<br />
     Check_time: 2013-02-06 15:26:35<br />
      Collation: utf8_general_ci<br />
       Checksum: NULL<br />
 Create_options:<br />
        Comment:<br />
1 row in set (0.00 sec)<br />
<br />
<br />
<br />
<br />
mysql&gt; show global variables like '%tmp%';<br />
+----------------+-----------------------+<br />
| Variable_name  | Value                 |<br />
+----------------+-----------------------+<br />
| bdb_tmpdir     | /usr/local/mysql/tmp/ |<br />
| max_tmp_tables | 32                    |<br />
| tmp_table_size | 8388608               |<br />
| tmpdir         | /usr/local/mysql/tmp  |<br />
+----------------+-----------------------+<br />
<br />
mysql&gt; show global variables like '%myisam%';<br />
+---------------------------------+---------------+<br />
| Variable_name                   | Value         |<br />
+---------------------------------+---------------+<br />
| myisam_data_pointer_size        | 4             |--before changing it was 4 .. i changed it to 6<br />
| myisam_max_extra_sort_file_size | 2147483648    |<br />
| myisam_max_sort_file_size       | 2147483647    |<br />
| myisam_recover_options          | OFF           |<br />
| myisam_repair_threads           | 1             |<br />
| myisam_sort_buffer_size         | 4194304       |<br />
| myisam_stats_method             | nulls_unequal |<br />
+---------------------------------+---------------]]></description>
            <dc:creator>miky heky</dc:creator>
            <category>MyISAM</category>
            <pubDate>Sun, 10 Feb 2013 03:48:31 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,578784,578784#msg-578784</guid>
            <title>LOCK replication safe? (1 reply)</title>
            <link>http://forums.mysql.com/read.php?21,578784,578784#msg-578784</link>
            <description><![CDATA[ We have master-slave replication using MyISAM tables.  I'm wondering if a LOCK will block a SELECT on a slave.<br />
<br />
I have a situation where only one can be active at any given time.<br />
<br />
LOCK TABLE tbl WRITE;<br />
UPDATE tbl SET status = 0 WHERE loc = 'A';<br />
  &lt;---- (from slave) SELECT * FROM tbl WHERE loc = 'A' AND status = 1; <br />
INSERT tbl (loc, status) VALUES ('A', 1);<br />
UNLOCK TABLES;<br />
<br />
This would normally block the SELECT until after the table was unlocked, but will this work if the SELECT is coming from a slave?<br />
<br />
If not, is there another way to do this?<br />
<br />
Thanks,<br />
Brad]]></description>
            <dc:creator>Brad Proctor</dc:creator>
            <category>MyISAM</category>
            <pubDate>Sat, 09 Feb 2013 18:55:29 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,577796,577796#msg-577796</guid>
            <title>5.1 to 5.5 upgrade causes significant write slowdown (MyISAM + indexes) (23 replies)</title>
            <link>http://forums.mysql.com/read.php?21,577796,577796#msg-577796</link>
            <description><![CDATA[ 5.1 to 5.5 upgrade causes significant write slowdown (MyISAM + indexes)<br />
<br />
We just upgraded from 5.1 to 5.5. An insert script that used to take ~3 mins to insert ~200k rows into a MyISAM table with 3 indexes now takes ~8 mins! Removing the indexes solves the issue!?<br />
<br />
Reads(selects) are fine (faster in 5.5 than 5.1)<br />
<br />
Is something different about index behavior or could there be some oddball config parameter that may need to be tweaked?<br />
<br />
Thanks in advance for any pointers!<br />
<br />
<br />
System Info:<br />
-----------<br />
Fedora 17<br />
Mysql 5.5.29-log<br />
16GB RAM<br />
MyISAM Key Buffer = 4GB<br />
MyISAM index size = ~800 MB<br />
MyISAM table size = 4.4 GB<br />
<br />
INNODB Buffer Pool = 8GB<br />
INNODB table+index size =  ~12GB]]></description>
            <dc:creator>Ben Wallach</dc:creator>
            <category>MyISAM</category>
            <pubDate>Fri, 01 Feb 2013 21:37:30 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,576928,576928#msg-576928</guid>
            <title>Waiting for table metadata lock (2 replies)</title>
            <link>http://forums.mysql.com/read.php?21,576928,576928#msg-576928</link>
            <description><![CDATA[ Our MySQL server (5.5.28 running on Ubuntu 12.04) keeps wedging a particular MyISAM table. From &quot;SHOW PROCESSLIST&quot; it appears that it is hanging on a &quot;LOCK TABLES &lt;foo&gt; WRITE&quot; statement in the state &quot;Waiting for table metadata lock&quot;, and that no other commands are operating at the moment that it wedges.<br />
<br />
Any suggestions as to how to resolve this gratefully received.]]></description>
            <dc:creator>Jon Ribbens</dc:creator>
            <category>MyISAM</category>
            <pubDate>Tue, 08 Jan 2013 11:15:02 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,576708,576708#msg-576708</guid>
            <title>Concurrency probloem of MyIsam. (1 reply)</title>
            <link>http://forums.mysql.com/read.php?21,576708,576708#msg-576708</link>
            <description><![CDATA[ I use mysql 5.5.15 to realize a data exchange queue bewteen two Process. I created a MyIsam table that only include two blob fields.<br />
     Processes A and B at the same time to operate the table,Process A insert record continuously,Process B get the first record and delete it continuously.<br />
     However, I found that inserted data by process A and obtained data by process B inconsistencies in the number.Such as process A insert 1000 records,but process B only obtained 900 records,and randomly lost some records.<br />
     The following is my my.cnf file:<br />
<br />
# The MySQL server<br />
[mysqld]<br />
basedir         = /usr/local/mysql<br />
datadir         = /usr/local/mysql/var/data<br />
port = 3306<br />
socket = /usr/local/mysql/var/mysql.sock<br />
<br />
skip-external-locking<br />
key_buffer_size = 256M<br />
max_allowed_packet = 32M<br />
concurrent_insert = 2<br />
max_write_lock_count=1<br />
low-priority-updates = 1<br />
table_open_cache = 256<br />
sort_buffer_size = 1M<br />
read_buffer_size = 1M<br />
read_rnd_buffer_size = 4M<br />
myisam_sort_buffer_size = 64M<br />
thread_cache_size = 8<br />
query_cache_size= 16M<br />
wait_timeout=28800<br />
interactive_timeout=28800<br />
# Try number of CPU's*2 for thread_concurrency<br />
thread_concurrency = 2<br />
<br />
log-bin=mysql-bin<br />
<br />
binlog_format=mixed<br />
<br />
<br />
server-id = 1<br />
<br />
<br />
<br />
[mysqldump]<br />
quick<br />
max_allowed_packet = 16M<br />
<br />
[mysql]<br />
no-auto-rehash<br />
# Remove the next comment character if you are not familiar with SQL<br />
#safe-updates<br />
<br />
[myisamchk]<br />
key_buffer_size = 128M<br />
sort_buffer_size = 128M<br />
read_buffer = 2M<br />
write_buffer = 2M<br />
<br />
[mysqlhotcopy]<br />
interactive-timeout <br />
<br />
Please give me some advice, thank you!]]></description>
            <dc:creator>landtunes nomatter</dc:creator>
            <category>MyISAM</category>
            <pubDate>Sat, 05 Jan 2013 21:23:57 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,575909,575909#msg-575909</guid>
            <title>Rebuilding Index (1 reply)</title>
            <link>http://forums.mysql.com/read.php?21,575909,575909#msg-575909</link>
            <description><![CDATA[ Currently the performance of MySQL is low. After checking the structure of some tables via phpMyAdmin, I found that the cardinality of some indexes are strange. Sometime the cardinality is 0, and sometime the cardinality is simply the same as the number of rows. After I repair/optimize the tables, the cardinality return back to what I expect and the queries are returned faster than before.<br />
<br />
I would like to know if there any way to identify the tables with such issue? Then I will do optimize table for those tables only.<br />
<br />
Thanks in advance.]]></description>
            <dc:creator>Charles Siu</dc:creator>
            <category>MyISAM</category>
            <pubDate>Thu, 20 Dec 2012 20:48:00 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,575141,575141#msg-575141</guid>
            <title>convert myisam to innodb - table status (3 replies)</title>
            <link>http://forums.mysql.com/read.php?21,575141,575141#msg-575141</link>
            <description><![CDATA[ hi<br />
<br />
I'm going to convert a huge table (150GB) from myisam to innodb and wondering if during this operation the table can receive updates and inserts? Can it be done on-line??<br />
This action will take on my HW serveral hours.<br />
Please explain to me what happens to the converted table?]]></description>
            <dc:creator>Greg K.</dc:creator>
            <category>MyISAM</category>
            <pubDate>Sun, 13 Jan 2013 06:00:11 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,574783,574783#msg-574783</guid>
            <title>Help to optimize query (1 reply)</title>
            <link>http://forums.mysql.com/read.php?21,574783,574783#msg-574783</link>
            <description><![CDATA[ First of all, I'm sorry if this isn't the correct forum for this kind of thing, but since I'm using MyISAM, I'm posting here :)<br />
<br />
I have a query which is taking more than 10 minutes to finish and I'm not sure what else can be done to optimize either the query or the database.<br />
<br />
The query is:<br />
<br />
<pre class="bbcode">
SELECT 'View' Name, view.fk_id_affiliate_site ID, Count(*) Quantity, campaign.billing_type Billing_type, campaign.id_campaign Id_campaign,
                        campaign.percent_cut Percent_campaign
                        FROM `spd_log_view` view
                        INNER JOIN spd_unit unit ON ( view.fk_id_unit = unit.id_unit AND unit.fk_id_ad_format = 2 )
                        INNER JOIN spd_ad ad ON ( unit.fk_id_ad = ad.id_ad )
                        INNER JOIN spd_campaign campaign ON ( ad.fk_id_campaign = campaign.id_campaign )
                        INNER JOIN spd_affiliate_site site ON ( site.id_affiliate_site = view.fk_id_affiliate_site )
                        WHERE timestamp BETWEEN 1353898800.0000 AND 1353985200 GROUP BY view.fk_id_affiliate_site, campaign.id_campaign
                        UNION
                        SELECT 'Click' Name, click.fk_id_affiliate_site ID, Count(*) Quantity, campaign.cpc CPC, campaign.cpm CPM, campaign.billing_type Billing_type, campaign.id_campaign Id_campaign,
                        IF(site.percent_cut = 0,campaign.percent_cut ,site.percent_cut) Percent, site.percent_cut Percent_site, campaign.percent_cut Percent_campaign
                        FROM `spd_log_click` click
                        INNER JOIN spd_unit unit ON ( click.fk_id_unit = unit.id_unit AND unit.fk_id_ad_format = 2 )
                        INNER JOIN spd_ad ad ON ( unit.fk_id_ad = ad.id_ad )
                        INNER JOIN spd_campaign campaign ON ( ad.fk_id_campaign = campaign.id_campaign )
                        INNER JOIN spd_affiliate_site site ON ( site.id_affiliate_site = click.fk_id_affiliate_site )
                        WHERE timestamp BETWEEN 1353898800.0000 AND 1353985200 GROUP BY click.fk_id_affiliate_site, campaign.id_campaign</pre>
<br />
<br />
Explain output:<br />
<pre class="bbcode">
+----+--------------+------------+--------+----------------------------------------------+-----------+---------+-------------------------------------------+----------+----------------------------------------------+
| id | select_type  | table      | type   | possible_keys                                | key       | key_len | ref                                       | rows     | Extra                                        |
+----+--------------+------------+--------+----------------------------------------------+-----------+---------+-------------------------------------------+----------+----------------------------------------------+
|  1 | PRIMARY      | view       | range  | fk_id_affiliate_site,fk_id_unit,timestamp    | timestamp | 8       | NULL                                      | 32725996 | Using where; Using temporary; Using filesort |
|  1 | PRIMARY      | unit       | eq_ref | PRIMARY,t_anuncio_t_pecas_fk,fk_id_ad_format | PRIMARY   | 4       | prod_front_end.view.fk_id_unit            |        1 | Using where                                  |
|  1 | PRIMARY      | ad         | eq_ref | PRIMARY,t_campanha_t_grupo_anuncio_fk        | PRIMARY   | 4       | prod_front_end.unit.fk_id_ad              |        1 |                                              |
|  1 | PRIMARY      | site       | eq_ref | PRIMARY                                      | PRIMARY   | 4       | prod_front_end.view.fk_id_affiliate_site  |        1 |                                              |
|  1 | PRIMARY      | campaign   | eq_ref | PRIMARY                                      | PRIMARY   | 4       | prod_front_end.ad.fk_id_campaign          |        1 |                                              |
|  2 | UNION        | click      | range  | fk_id_affiliate_site,fk_id_unit,timestamp    | timestamp | 8       | NULL                                      |    68398 | Using where; Using temporary; Using filesort |
|  2 | UNION        | unit       | eq_ref | PRIMARY,t_anuncio_t_pecas_fk,fk_id_ad_format | PRIMARY   | 4       | prod_front_end.click.fk_id_unit           |        1 | Using where                                  |
|  2 | UNION        | ad         | eq_ref | PRIMARY,t_campanha_t_grupo_anuncio_fk        | PRIMARY   | 4       | prod_front_end.unit.fk_id_ad              |        1 |                                              |
|  2 | UNION        | site       | eq_ref | PRIMARY                                      | PRIMARY   | 4       | prod_front_end.click.fk_id_affiliate_site |        1 |                                              |
|  2 | UNION        | campaign   | eq_ref | PRIMARY                                      | PRIMARY   | 4       | prod_front_end.ad.fk_id_campaign          |        1 |                                              |
| NULL | UNION RESULT | &lt;union1,2&gt; | ALL    | NULL                                         | NULL      | NULL    | NULL                                      |     NULL |                                              |
+----+--------------+------------+--------+----------------------------------------------+-----------+---------+-------------------------------------------+----------+----------------------------------------------+
11 rows in set (0.04 sec)</pre>
<br />
<br />
I'm an AWS RDS user, so I installed MySQL 5.5 with all the default variables, and changed only these two:<br />
<br />
mysql&gt; show variables LIKE '%table_size';<br />
+---------------------+----------+<br />
| Variable_name       | Value    |<br />
+---------------------+----------+<br />
| max_heap_table_size | 67108864 |<br />
| tmp_table_size      | 67108864 |<br />
+---------------------+----------+<br />
<br />
Any help will be very much appreciated.<br />
<br />
Thanks in advance.]]></description>
            <dc:creator>Daniel Morais</dc:creator>
            <category>MyISAM</category>
            <pubDate>Sun, 02 Dec 2012 15:23:14 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,574292,574292#msg-574292</guid>
            <title>Unknown MyISAM file (1 reply)</title>
            <link>http://forums.mysql.com/read.php?21,574292,574292#msg-574292</link>
            <description><![CDATA[ Noob question: I've been using MySQL 5.5.28 on 64-bit Windows 7 for a few months. There's a file on my system that I can't identify called &quot;localhost.MyISAM&quot;.  It's currently over 300 GB.<br />
<br />
Where might I find information on this file, and about how to manage it?  It's occupying about 60% of the drive.<br />
<br />
Thanks for any info,<br />
Tom]]></description>
            <dc:creator>Tom Cleaveland</dc:creator>
            <category>MyISAM</category>
            <pubDate>Wed, 21 Nov 2012 15:43:01 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,572598,572598#msg-572598</guid>
            <title>Enable Keys use keycache with &quot;errorno 0&quot; - 800Million Rows in one partition - 5 index (3 replies)</title>
            <link>http://forums.mysql.com/read.php?21,572598,572598#msg-572598</link>
            <description><![CDATA[ Hi all,<br />
<br />
I have the following issue <br />
<br />
I use mySQL version 5.5.14 , Linux Redhat 64 bits<br />
<br />
I Would like to use &quot;Repair by sorting&quot; instead of &quot;repair by keycache&quot;<br />
but I can't success<br />
<br />
When I perform &quot;Alter table MyTable enable keys&quot; In log I always see this:<br />
[Warning] Warning: Enabling keys got errno 0 on MyBase.Mytable, retrying<br />
And then the repair is done with KeyCache<br />
<br />
my.cnf is like this:<br />
- myisam-sort-buffer-size=16G    =&gt; I've tried also with 32G/64G<br />
- key_buffer_size=16G            =&gt; I've tried also with 32G  <br />
- myisam-max-sort-file-size=90G  ==&gt; file system has 100G<br />
<br />
I have tried &quot;myisamchk -r&quot; and it works well &quot;with sort&quot; but it isn't what I want to use moreover it is not supported for partition. <br />
<br />
I want to use &quot;Alter Table...&quot;<br />
<br />
After repair is finish<br />
Partition Table File size is on disk : 25G <br />
Partition Index File size is on disk :<br />
      - 8G &quot;with sort using myisamchk -r&quot; <br />
      - 16G with keycache using &quot;Alter table...&quot;<br />
<br />
(for information i have also tried with thread and it works well but it is beta code.)<br />
<br />
same issue whether I do &quot;Repair table&quot; I can see &quot;Keycache&quot; but I haven't any error in logs<br />
<br />
Finally I have 32 hours using &quot;Repair Keycache&quot; and 1 hour using &quot;Repair by Sort&quot; <br />
<br />
Any help would be great]]></description>
            <dc:creator>Emmanuel Vincent</dc:creator>
            <category>MyISAM</category>
            <pubDate>Wed, 07 Nov 2012 09:17:25 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,572375,572375#msg-572375</guid>
            <title>Index Keys of the table (4 replies)</title>
            <link>http://forums.mysql.com/read.php?21,572375,572375#msg-572375</link>
            <description><![CDATA[ Dear Sir/Madam,<br />
<br />
I have table structure as following:<br />
<br />
<br />
CREATE TABLE IF NOT EXISTS `contacts` (<br />
  `ContactID` varchar(30) NOT NULL,<br />
  `Name` varchar(30) NOT NULL,<br />
  `Gender` char(1) NOT NULL,<br />
  `Phone` varchar(16) NOT NULL,<br />
  `Email` varchar(50) NOT NULL,<br />
  `Address` varchar(100) NOT NULL,<br />
  `DOB` varchar(8) NOT NULL<br />
  PRIMARY KEY (`ContactID`),<br />
) ENGINE=MyISAM DEFAULT CHARSET=latin1;<br />
<br />
Users can search the contact with following fields:<br />
  - Name<br />
  - Gender<br />
  - Phone<br />
  - Email<br />
  - DOB<br />
<br />
Possible SELECT queries are:<br />
SELECT * FROM contacts WHERE Name = ?;<br />
SELECT * FROM contacts WHERE Phone = ?;<br />
SELECT * FROM contacts WHERE Name = ? AND Gender = ?;<br />
SELECT * FROM contacts WHERE Phone = ? AND Email = ?;<br />
SELECT * FROM contacts WHERE Name = ? AND Gender = ? AND Phone = ?;<br />
<br />
I wonder whether I should create an index key with all searching fields, or create index keys one by one.<br />
<br />
As I understand a 'grouped' index keys could give higher performance rather than individual index keys.<br />
However, since the users may search different fields each time, how should I manage my index keys for good/high performance?<br />
<br />
Should I create the KEY as following?<br />
KEY(Name, Gender, Phone, Email, DOB)<br />
<br />
OR following will be better?<br />
KEY1(Name)<br />
KEY2(Gender)<br />
KEY3(Phone)<br />
KEY4(Email)<br />
KEY5(DOB)<br />
<br />
Your comments will be highly appreciated!]]></description>
            <dc:creator>fei lee</dc:creator>
            <category>MyISAM</category>
            <pubDate>Mon, 05 Nov 2012 02:54:15 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,572354,572354#msg-572354</guid>
            <title>order by rand() Query takes too long (writes to disk) (1 reply)</title>
            <link>http://forums.mysql.com/read.php?21,572354,572354#msg-572354</link>
            <description><![CDATA[ HI<br />
<br />
I got a MYISAM table in my database with about 7 million rows.<br />
<br />
table has index,url,external_link_count fields.<br />
<br />
Now I want a seachquery to get one url of each domain.Each query should return different urls than the last query.<br />
<br />
so I do:<br />
SELECT x.* FROM (SELECT * FROM table WHERE external_link_count &lt; 50 order by rand()) x GROUP BY SUBSTRING_INDEX(url,'/',3)<br />
<br />
Now my problem is:<br />
1) The query locks the database and the same query from other tools can not access the datbase -&gt; huge delay time<br />
All other tools has to wait for the current query to complete.<br />
<br />
2) The query writes a &quot;temp&quot; table to disk -&gt; huge delay time<br />
<br />
Question:<br />
Is it possible to do a smarter and faster query to solve this problem, or is there any idea to tweak the performance?<br />
<br />
The running tools execute this query 4-8 times and hours in total.<br />
<br />
System: <br />
I5 Core 2,7Ghz<br />
16 GB Ram<br />
120 GB SSD Disk<br />
Windows 7 Enterprise 64Bit<br />
<br />
<br />
Thank you very much in advance]]></description>
            <dc:creator>Bernd Meier</dc:creator>
            <category>MyISAM</category>
            <pubDate>Tue, 30 Oct 2012 18:22:28 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,572221,572221#msg-572221</guid>
            <title>Working with short words in full text search (2 replies)</title>
            <link>http://forums.mysql.com/read.php?21,572221,572221#msg-572221</link>
            <description><![CDATA[ I noticed this limitation in MySQL.  &quot;The default minimum length of words that are found by full-text searches is four characters.&quot; How does one circumvent this limitation. Can I modify the default? If so, how?<br />
<br />
Thanks<br />
Thato Mantai]]></description>
            <dc:creator>Thato Mantai</dc:creator>
            <category>MyISAM</category>
            <pubDate>Tue, 06 Nov 2012 21:00:38 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,570570,570570#msg-570570</guid>
            <title>Help understanding the relationship between threads and opened tables for MyISAM (1 reply)</title>
            <link>http://forums.mysql.com/read.php?21,570570,570570#msg-570570</link>
            <description><![CDATA[ Hey,<br />
<br />
We've been having trouble understanding the relationship between threads and opened tables for MyISAM for a while now, despite reading all of the documentation. Quoting the mysql docs, &quot;To minimize the problem with multiple client sessions having different states on the same table, the table is opened independently by each concurrent session&quot;. Following this logic, it would seem that if you create 5 different connections and they all perform a sql_no_cache count(*) on a table, 5 copies of that table will be opened. However, we are only seeing this behavior when the queries are made SIMULTANEOUSLY (5 copies of the table can be seen by looking at file descriptors, and we see 5 tables when we run &gt;show global status like &quot;Opened_tables&quot;;). When the query is made sequentially on each connection, though, all connections appear to share the file descriptors and &gt;show global status like &quot;Opened_tables&quot;; only equals 1.<br />
<br />
The specific problem that we are having is that many of our tables are heavily partitioned, and we are running into issues around too many file descriptors being opened. For example, we often see tables with 150 partitions opened 20 times (20x150 copies of MYD file descriptors opened, 1x150 copy of MYIs). We allow up to 300 simultaneous connections, but there is no point in time where those tables are getting queried 20 times simultaneously. Anyway we were thinking that, per what the docs say, maybe 20 different threads were each holding onto a copy of the tables, but our basic testing has shown that the threads will in fact share the MyISAM resources if they are not being used at the same time.<br />
<br />
Any help would be greatly appreciated. Thanks!]]></description>
            <dc:creator>Michael Finch</dc:creator>
            <category>MyISAM</category>
            <pubDate>Thu, 11 Oct 2012 02:02:08 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,568720,568720#msg-568720</guid>
            <title>MySQL Full Text Search not returing all records (2 replies)</title>
            <link>http://forums.mysql.com/read.php?21,568720,568720#msg-568720</link>
            <description><![CDATA[ First time implementing Full Text Search...<br />
<br />
I've run the necessary ALTER TABLE SQL to enable FULLTEXT on the applicable tables/fields.<br />
<br />
On the following beta site: <a href="http://wtc.betaforming.com/"  rel="nofollow">http://wtc.betaforming.com/</a><br />
<br />
If I do a search for &quot;leadership&quot;, I get normal results except for the Events section at the bottom. I have Events with that word in the event title and throughout the description copy (http://wtc.betaforming.com/events/event/?event_id=10039).<br />
<br />
If I do a search for &quot;communications&quot;, I get results in the Events section, which makes me think I have everything configured correctly.<br />
<br />
I'm using the following basic code for testing purposes:<br />
<br />
SELECT *<br />
FROM tblevents<br />
WHERE MATCH(event_title, event_desc_long, event_desc_short, event_tab_one_title, event_tab_one_text, event_tab_two_title, event_tab_two_text, event_tab_three_title, event_tab_three_text, event_tab_four_title, event_tab_four_text) AGAINST ('$site_search_term')<br />
<br />
This is the same code I'm using to search Products and Articles (changing the necessary FROM and WHERE information).<br />
<br />
Not sure what is happening (since it works for some phrases) or where to start looking in my db to see what is wrong.<br />
<br />
Thanks<br />
<br />
Brett]]></description>
            <dc:creator>Brett Atkin</dc:creator>
            <category>MyISAM</category>
            <pubDate>Tue, 18 Sep 2012 13:39:15 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,568616,568616#msg-568616</guid>
            <title>Add multiple interrior ring to mysql spatial extention (1 reply)</title>
            <link>http://forums.mysql.com/read.php?21,568616,568616#msg-568616</link>
            <description><![CDATA[ Hi, this is first time for me to use MySql spatial extension (MyIsam)<br />
<br />
I'm currently convert all polygon in ESRI shapefile format (.SHP)<br />
into MySql geometry column table<br />
<br />
<br />
base on documentation: <br />
A Polygon with one exterior ring and one interior ring:<br />
POLYGON((0 0,10 0,10 10,0 10,0 0),(5 5,7 5,7 7,5 7, 5 5))<br />
<br />
<br />
I'm having problem where the polygon have 3 exterior ring and 2 interior ring<br />
how can i do that with Insert Query<br />
<br />
<br />
Thanks]]></description>
            <dc:creator>Hendra Darwintha</dc:creator>
            <category>MyISAM</category>
            <pubDate>Thu, 20 Sep 2012 08:05:01 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,568307,568307#msg-568307</guid>
            <title>query scanning all rows (1 reply)</title>
            <link>http://forums.mysql.com/read.php?21,568307,568307#msg-568307</link>
            <description><![CDATA[ Guys trying to wrap my head around mysql query on why it is scanning all rows in table<br />
<br />
I have 2 tables topic_entry and topic_user<br />
<br />
CREATE TABLE `topic_entry` (<br />
  `entry_id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,<br />
  `topic_id` bigint(20) unsigned NOT NULL,<br />
  `entry_created` datetime NOT NULL,<br />
  `entry_object` text,<br />
  `level` tinyint(4) NOT NULL DEFAULT '3',<br />
  PRIMARY KEY (`entry_id`),<br />
  KEY `entry_created` (`entry_created`),<br />
  KEY `level` (`level`),<br />
  KEY `topic_id_2` (`topic_id`,`entry_id`)<br />
) ENGINE=MyISAM;<br />
<br />
CREATE TABLE `topic_user` (<br />
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,<br />
  `topic_id` bigint(20) unsigned NOT NULL,<br />
  `user_id` varchar(100) NOT NULL,<br />
  `private` enum('y','n') DEFAULT NULL,<br />
  `freq` enum('a','d','w') DEFAULT NULL,<br />
  `topic_id_freq` varchar(10) DEFAULT NULL,<br />
  `casematch` enum('0','1') DEFAULT '0',<br />
  `textmatch` enum('0','1') DEFAULT '0',<br />
  `topic_name_case` varchar(100) DEFAULT '',<br />
  PRIMARY KEY (`id`),<br />
  UNIQUE KEY `topic_id_user_id` (`topic_id`,`user_id`),<br />
  KEY `user_id` (`user_id`),<br />
  KEY `topic_id_freq` (`topic_id_freq`)<br />
) ENGINE=MyISAM;<br />
This is the query that i am trying to run<br />
<br />
explain <br />
select  te.topic_id,te.entry_id <br />
from topic_entry te <br />
WHERE te.topic_id in (select topic_id <br />
                        from topic_user where user_id ='xyz') <br />
    AND te.level=4 <br />
    <br />
ORDER BY te.entry_id DESC <br />
LIMIT 5;<br />
<br />
<br />
The explain output shows that it is scanning all rows<br />
|  1 | PRIMARY| te | range  | PRIMARY,level | PRIMARY | 8 | NULL| **722978** | Using where              | <br />
|  2 | DEPENDENT SUBQUERY | topic_user | unique_subquery | topic_id_user_id,user_id | topic_id_user_id | 310     | func,const |      1 | Using index; Using where |<br />
<br />
If i remove order by clause from query it work perfectly<br />
Any pointers would be appreciated]]></description>
            <dc:creator>jay oberoi</dc:creator>
            <category>MyISAM</category>
            <pubDate>Sat, 15 Sep 2012 18:44:39 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,566971,566971#msg-566971</guid>
            <title>fulltext boolean search not returning a particular row (3 replies)</title>
            <link>http://forums.mysql.com/read.php?21,566971,566971#msg-566971</link>
            <description><![CDATA[ Hi,<br />
I have a record containing &quot;Do You Still Think of Me&quot; (the table has about 2700 records), <br />
and the following query does not return the record;<br />
SELECT * FROM productions <br />
WHERE MATCH (title) AGAINST ('+Do +You +Still +Think +of +Me' IN BOOLEAN MODE) <br />
(neither with the + removed, or less keywords)<br />
The rest of the table seems to be returned okay on their keywords, just not this record.<br />
The ft min word length is 4, but should still return if I query on +Still +Think<br />
MySql version is 5.0 (this is hosted, can't upgrade..)<br />
there is a fulltext index on title, and the engine is MyIsam<br />
I repaired and optimized the table, dropped and recreated the fulltext index, no luck :-(<br />
<br />
Any pointers?]]></description>
            <dc:creator>Sascha Monteiro</dc:creator>
            <category>MyISAM</category>
            <pubDate>Mon, 03 Sep 2012 00:01:34 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,566205,566205#msg-566205</guid>
            <title>Almost whole table in single index: is there a better way? (11 replies)</title>
            <link>http://forums.mysql.com/read.php?21,566205,566205#msg-566205</link>
            <description><![CDATA[ I have have a MyISAM table which collects live data (e.g. wind speed, temperature) and other data from remote data loggers. Each data logger has an unique RemoteID, and each type of data (e.g. wind speed) has a specific DataID. The time SensorTime is stored as a unix timestamp. To improve performance, the table is partitioned by month, using the unix timestamps. There are around 250 million rows added per month, and the data is kept for 12 months by dropping the partition which is 12 months old.<br />
Value is a char(8) because sometimes the data might not be numeric, and I wanted a fixed row length.<br />
<br />
A typical query might try to plot a weeks worth of data for a single sensor, and looks like:<br />
SELECT SensorTime,Value FROM RemoteStatuses WHERE RemoteID = X AND DataID = Y AND SensorTime BETWEEN A AND B<br />
<br />
Data is regularly inserted in batches of around 100 in a single &quot;INSERT IGNORE&quot; statement.<br />
<br />
CREATE TABLE `RemoteStatuses` (<br />
  `RemoteID` int(11) NOT NULL,<br />
  `SensorTime` int(11) NOT NULL,<br />
  `DataID` smallint(6) NOT NULL,<br />
  `Value` char(8) NOT NULL,<br />
  PRIMARY KEY (`RemoteID`,`DataID`,`SensorTime`)<br />
) ENGINE=MyISAM DEFAULT CHARSET=latin1<br />
/*!50100 PARTITION BY RANGE (SensorTime)<br />
(PARTITION p201208 VALUES LESS THAN ( UNIX_TIMESTAMP('2012-08-01 00:00:00') ),<br />
PARTITION p201209 VALUES LESS THAN ( UNIX_TIMESTAMP('2012-09-01 00:00:00') ),<br />
PARTITION p201210 VALUES LESS THAN ( UNIX_TIMESTAMP('2012-10-01 00:00:00') ),<br />
PARTITION p201211 VALUES LESS THAN ( UNIX_TIMESTAMP('2012-11-01 00:00:00') ),<br />
PARTITION p201212 VALUES LESS THAN ( UNIX_TIMESTAMP('2012-12-01 00:00:00') ),<br />
PARTITION pend VALUES LESS THAN MAXVALUE ENGINE = MyISAM) */;<br />
<br />
Indexing three out of four of the columns seems a bit much, and results in large index files (MYI and MYD are comparable in size)<br />
Can any clever person out there think of a better way of storing and indexing all three columns?]]></description>
            <dc:creator>Andy Deakin</dc:creator>
            <category>MyISAM</category>
            <pubDate>Wed, 29 Aug 2012 05:20:57 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,565097,565097#msg-565097</guid>
            <title>5% of spare memory key buffer big enough? (2 replies)</title>
            <link>http://forums.mysql.com/read.php?21,565097,565097#msg-565097</link>
            <description><![CDATA[ Hi All,<br />
<br />
I'm looking into optimizing my companies mysql server, and one of the first places I've looked at is the key buffer size. At the moment it's set to 400MB, and according to the server there is generally about 10GB of memory free, so that's less than 5%, and from what I read it's generally a good idea to have it between 25 and 50%<br />
<br />
It's a pretty large database, 200GB+, and some of the indexes on single tables are over 1GB, so I expected the low key buffer size to adversely affect performance, but I checked the stats for them and they don't seem that bad:<br />
<br />
| Key_blocks_not_flushed | 0            |                                                                                                                                                       <br />
| Key_blocks_unused      | 484          |                                                                                                                                                       <br />
| Key_blocks_used        | 319666       |                                                                                                                                                       <br />
| Key_read_requests      | 399516496499 |                                                                                                                                                       <br />
| Key_reads              | 223702306    |                                                                                                                                                       <br />
| Key_write_requests     | 4692155028   |                                                                                                                                                       <br />
| Key_writes             | 1711169289   <br />
<br />
<br />
(I'm not overly familiar with these stats so perhaps I'm interpreting them incorrectly)<br />
<br />
<br />
I realise the ideal size is largely dependant on the data and usage of the database, which is extremely varied, but would there still likely be some benefit to increasing the size?<br />
<br />
<br />
Also my our system administrator says mysql would need to be restarted after changing key_buffer_size, but I've not seen anything that states that, is it the case? (Server version is 5.5.1)<br />
<br />
Thanks!]]></description>
            <dc:creator>Josh Irish</dc:creator>
            <category>MyISAM</category>
            <pubDate>Sun, 19 Aug 2012 19:41:23 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,564318,564318#msg-564318</guid>
            <title>Two instances better - or mix MyISAM and InnoDB? (4 replies)</title>
            <link>http://forums.mysql.com/read.php?21,564318,564318#msg-564318</link>
            <description><![CDATA[ I may have submitted this question to the wrong forum.  I'll try here.<br />
<br />
We use MySQL to support a large OLAP type application with one very large table that is only updated once a month. By large, I mean 1.5 billion rows. We use MyISAM for this table for performance reasons, and also because we use merge tables to facilitate the monthly updates (dropping the oldest merge table, and adding a new one).<br />
<br />
We are developing a new application that is highly relational and makes heavy use of real-time user-driven transactions with joins and commits. We will be using Innodb tables for this functionality.<br />
<br />
We have a dedicated db server that currently runs one instance of MySQL with the MyISAM table format. To support the new transaction-driven functionality under development is it better to continue with one instance of MySQL and mix the two table types, or would it be better to run two instances of MySQL, with different ports and data directories?<br />
<br />
Thank you for any insight you might have...<br />
<br />
-Jim Gallagher]]></description>
            <dc:creator>zenia</dc:creator>
            <category>MyISAM</category>
            <pubDate>Sun, 19 Aug 2012 04:15:50 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,563690,563690#msg-563690</guid>
            <title>Error &quot;Duplicate entry for key 1&quot;, but there don't seem to be any duplicates... (1 reply)</title>
            <link>http://forums.mysql.com/read.php?21,563690,563690#msg-563690</link>
            <description><![CDATA[ I am performing a sync process on some data in a mysql database (The mysql server version is 5.0.91-log and it is running on a Linux box).<br />
<br />
I am receiving an error like &quot;Duplicate entry '26552' for key 1&quot; every time a certain query sequence is executed as part of a sync process I have set up.<br />
<br />
The entry number is gradually increasing each time the query fails as per &quot;Error in query: Duplicate entry '25065' for key 1&quot; then &quot;Error in query: Duplicate entry '25337' for key 1&quot;, then &quot;Error in query: Duplicate entry '25759' for key 1&quot; ... , but other than that, the error is the same.<br />
<br />
The error is returned as a result of running the query, &quot;INSERT INTO `mydatabase`.mytable_just_before_umd_sync SELECT * FROM `mydatabase`.mytable&quot;<br />
<br />
I run the process via cron on an hourly basis.<br />
<br />
In order to verfify the sync process, I create some temporary copies of table/s that can be modified by the sync process.<br />
<br />
I do this using some php, as below (executeQuery(...) is basically mysql_query($query) with some error checking and logging):<br />
<br />
            $tableName = &quot;mytable_just_before_umd_sync&quot;;<br />
            $query = &quot;DROP TABLE IF EXISTS $tableName&quot;;<br />
            $result = executeQuery($query, $tableName, __FUNCTION__, __LINE__);<br />
<br />
            $query = &quot;CREATE TABLE $tableName LIKE $table&quot;;<br />
            $result = executeQuery($query, $tableName, __FUNCTION__, __LINE__);<br />
<br />
            $query = &quot;INSERT INTO $tableName SELECT * FROM $table&quot;;<br />
            $result = executeQuery($query, $tableName, __FUNCTION__, __LINE__);<br />
<br />
<br />
mytable is as follows:<br />
<br />
CREATE TABLE `mytable` (<br />
  `id` bigint(20) unsigned NOT NULL auto_increment,<br />
  `user_id` bigint(20) unsigned NOT NULL,<br />
  `school_id` bigint(20) unsigned NOT NULL,<br />
  PRIMARY KEY  (`id`)<br />
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 ROW_FORMAT=FIXED AUTO_INCREMENT=26958 ;<br />
<br />
I've checked, and there are no duplicates in mytable (couldn't really be anyhow as id is primary).<br />
<br />
Is key 1 refering to mytable_just_before_umd_sync.id?<br />
<br />
Would this be some kind of race issue (i.e. is the DROP TABLE still operating and then maybe the INSERT INTO operation catches up and hence the duplicate. I don't know how DROP TABLE works? Does it complete before returning?)?<br />
<br />
Should I put something like &quot;LOCK TABLES `mytable` WRITE;&quot; and &quot;UNLOCK TABLES;&quot; around the &quot;INSERT INTO $tableName SELECT * FROM $table;&quot; command?<br />
<br />
I've used mysql for some time, but this is a bit above my level.<br />
<br />
Anyone have any ideas about what might be causing this issue?<br />
<br />
I've googled and looked into the issue, but am at a bit of a loss really.<br />
<br />
any help appreciated<br />
<br />
Kenn]]></description>
            <dc:creator>Kenn Baker</dc:creator>
            <category>MyISAM</category>
            <pubDate>Fri, 03 Aug 2012 05:06:52 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,563564,563564#msg-563564</guid>
            <title>A Question on MyISAM table locking on joins. (1 reply)</title>
            <link>http://forums.mysql.com/read.php?21,563564,563564#msg-563564</link>
            <description><![CDATA[ Recently we had a crash that inadvertantly switched our DB over from Innodb to MyISAM.  I just want to confirm a behavior I was seeing in the slow log.<br />
<br />
There were certain queries coming through that did multiple joins across many tables where the inner most table was a huge regex search on a varchar field on a table with nearly a billion records in it that was forcing a full table scan.  This query if ran multiple times would cause locks to occur.<br />
<br />
My question is that since this is an abysmally slow query, does that query also lock every table in the join that is a part of the query, or just the table that it's currently searching on?  <br />
<br />
I was noticing huge performance issues caused by the accidental switch over, and I was wondering if possibly cascading table locks were occuring from the query mentioned above that was locking out othe tables in the system that other users might  have been using?<br />
<br />
Thanks for the help!]]></description>
            <dc:creator>John Snow</dc:creator>
            <category>MyISAM</category>
            <pubDate>Fri, 03 Aug 2012 06:38:28 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,561466,561466#msg-561466</guid>
            <title>Improve performance of a query with join and order by (1 reply)</title>
            <link>http://forums.mysql.com/read.php?21,561466,561466#msg-561466</link>
            <description><![CDATA[ Hi all, i have the following situation:<br />
<br />
First table is table1(field1,field2,field3,.......,field11,field12) and second table is table2(a, b, c)<br />
<br />
a is foreign key for field1 which is an integer.<br />
<br />
field12 is a timestamp and it has an index on it.<br />
<br />
table1 has nearly 2000000 records and table2 has nearly 56000000 records and both tables are MyISAM.<br />
<br />
<br />
I have to perform the following query:<br />
<br />
SELECT t1.*<br />
FROM table1 t1<br />
JOIN table2 t2 ON t2.a = t1.field1<br />
AND t2.b = '83'<br />
AND t2.c = '66'<br />
WHERE t1.field3 IN ( 6 )<br />
AND t1.field4 = '0'<br />
ORDER BY t1.field12<br />
LIMIT 5000<br />
<br />
The problem is that it takes nearly 12 minutes to execute and i don't get why.<br />
Expecially i don't get why the index can't help inside the ORDER BY.<br />
<br />
I tried to execute it with explain and i can see that it's not using the index on field12.<br />
<br />
Can someone tell me what am i missing?<br />
<br />
Thanks in advance for the help.]]></description>
            <dc:creator>Mario Rossi</dc:creator>
            <category>MyISAM</category>
            <pubDate>Tue, 17 Jul 2012 05:08:42 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,560981,560981#msg-560981</guid>
            <title>Es posible recuperar datos de una tabla (no replies)</title>
            <link>http://forums.mysql.com/read.php?21,560981,560981#msg-560981</link>
            <description><![CDATA[ se puede recuperar datos los datos de una tabla myisam que fueron eliminador por delete * from tabla<br />
<br />
gracias]]></description>
            <dc:creator>Mauricio Zambrana</dc:creator>
            <category>MyISAM</category>
            <pubDate>Thu, 12 Jul 2012 19:30:32 +0000</pubDate>
        </item>
        <item>
            <guid>http://forums.mysql.com/read.php?21,560614,560614#msg-560614</guid>
            <title>How to index a 1.5 billion rows (6 replies)</title>
            <link>http://forums.mysql.com/read.php?21,560614,560614#msg-560614</link>
            <description><![CDATA[ Hi!<br />
How to index a 1.5 billion rows <br />
quickly through the fields of type VARCHAR(32)<br />
<br />
My first encounter with indexation.<br />
What should be done before indexing. What to do configuration<br />
Is it possible to calculate the time of indexing?<br />
<br />
P.S. OS-Windows XP<br />
     MySQL-5.5.25<br />
     CPU Athlon 2*2GHZ<br />
     RAM DDR2-800 2GB<br />
     HDD Hitachi 1TB 8MB]]></description>
            <dc:creator>Vladimir Pivovar</dc:creator>
            <category>MyISAM</category>
            <pubDate>Sun, 29 Jul 2012 10:42:01 +0000</pubDate>
        </item>
    </channel>
</rss>
