Writing by corra on Saturday, 25 of November , 2006 at 1:10 pm

Watch the number of average queries per second

Please pay attention to the load average of the server
I was astonished when I saw these numbers. Does anyone has the same MySQL performance?
The server we are talking about is a replicating slave server (double XEON processor, 1GB RAM) of www.inter.it, during AC Milan-Inter Milan match.
Writing by corra on Friday, 24 of November , 2006 at 4:27 pm
In some situation (as described below in “how to repeat”) the table_rows column
in the information_schema.tables table is not computed correctly.
The problem arise only for tables included in a merge table.
It seems that if you issue a select statement on a “merged table” the following
insert statement does not update the metadata table_rows.
How-to-repeat
First of all let’s try the example showing the expected behavior
mysql> create table t1 (a int);
Query OK, 0 rows affected (0.00 sec)
mysql> create table t2 (a int);
Query OK, 0 rows affected (0.01 sec)
mysql> create table t (a int) engine=merge union=(t1,t2) insert_method=last;
Query OK, 0 rows affected (0.01 sec)
mysql> insert into t values(1),(2);
Query OK, 2 rows affected (0.00 sec)
Records: 2 Duplicates: 0 Warnings: 0
mysql> insert into t1 values(3),(4);
Query OK, 2 rows affected (0.00 sec)
Records: 2 Duplicates: 0 Warnings: 0
mysql> select table_name,table_rows from information_schema.tables where
table_name in ('t1','t2','t');
+------------+------------+
| table_name | table_rows |
+------------+------------+
| t | 4 |
| t1 | 2 |
| t2 | 2 |
+------------+------------+
3 rows in set (0.01 sec)
mysql> insert into t values(5);
Query OK, 1 row affected (0.00 sec)
mysql> select table_name,table_rows from information_schema.tables where
table_name in ('t1','t2','t');
+------------+------------+
| table_name | table_rows |
+------------+------------+
| t | 5 |
| t1 | 2 |
| t2 | 3 |
+------------+------------+
3 rows in set (0.01 sec)
let’s try now the same example issuing a select statement before inserting the
value 5 in the merge table
mysql> create table t1 (a int);
Query OK, 0 rows affected (0.00 sec)
mysql> create table t2 (a int);
Query OK, 0 rows affected (0.00 sec)
mysql> create table t (a int) engine=merge union=(t1,t2) insert_method=last;
Query OK, 0 rows affected (0.00 sec)
mysql> insert into t values(1),(2);
Query OK, 2 rows affected (0.00 sec)
Records: 2 Duplicates: 0 Warnings: 0
mysql> insert into t1 values(3),(4);
Query OK, 2 rows affected (0.00 sec)
Records: 2 Duplicates: 0 Warnings: 0
mysql> select * from t2;
+------+
| a |
+------+
| 1 |
| 2 |
+------+
2 rows in set (0.00 sec)
mysql> insert into t values(5);
Query OK, 1 row affected (0.00 sec)
mysql> select table_name,table_rows from information_schema.tables where
table_name in ('t1','t2','t');
+------------+------------+
| table_name | table_rows |
+------------+------------+
| t | 5 |
| t1 | 2 |
| t2 | 2 |
+------------+------------+
3 rows in set (0.00 sec)
ooppss!! 2+2=5 ???
now, if you issue a select statement on t2, table_rows will be updated to the
right value
mysql> select * from t2;
+------+
| a |
+------+
| 1 |
| 2 |
| 5 |
+------+
3 rows in set (0.01 sec)
mysql> select table_name,table_rows from information_schema.tables where
table_name in ('t1','t2','t');
+------------+------------+
| table_name | table_rows |
+------------+------------+
| t | 5 |
| t1 | 2 |
| t2 | 3 |
+------------+------------+
3 rows in set (0.01 sec)
http://bugs.mysql.com/bug.php?id=24575
Comments Off Category: MySQLen
Writing by corra on Tuesday, 21 of November , 2006 at 11:45 pm
Oggi ho lavorato esclusivamente per la pagina più importante del sito benchè sia tra le meno viste in assoluto: l’organigramma.
Nonostante la sua sfrerzante semplicità è finita a database e ho implementato una bella paginetta di amministrazione con possibilità di modifca delle voci, cancellazioni, spostamento dei ruoli in sù e in giù. Tutto molto bello.
Abbiamo così disintermediato la modifica e la pubblicazione di tale pagina dal nostro operare ammanuense su html. Gli editor potranno adesso aggiornarla da soli.
Non ci crederete, ma trattasi di “LAVORONE”!!!
Writing by corra on Monday, 20 of November , 2006 at 7:40 pm
Sul mio nuovo macMINI carrozzato con 2 GB di ram ho installato Parallels e su una macchina virtuale (con 768MB di memoria) ho installato una Ubuntu 6.10 alla quale ho dato quasi una ventina di GB di disco.
Installazione di entrambi veloce e tranquilla.
Non ho ancora fatto cose travolgenti con la macchina virtuale, ma sembra funzionare tutto in modo egregio.
Comments Off Category: Lavoro
Writing by corra on Monday, 20 of November , 2006 at 7:36 pm
Ho scaricato dal sito della Free Software Foundation l’elenco aggiornato di tutti i CAP d’Italia.
Lo cercavo da tempo, adesso l’ho importato e possiamo fare verifiche di consistenza sui dati in nostro possesso.
Comments Off Category: Lavoro