ACDB  Log In Search

News

Welcome to ACDB News! Here we inform you of the latest changes in ACDB, along with announcements, daily quotes, and seasonal anime charts!

books Jul 30, 2011 | Rei
Started work on the Guide Books project.

It's something fun and easy, but led off on a difficult tangent.

This is roughly the 500th time I've created an HTML table. And likely the 300th time I'll write handlers for FORM data. Seems like as good a time as any to analyze all of them, find the similarities, and write a dynamic generation application to cut down on the duplication.

So working on that...


Another memory usage update on the session server.
73375 rei 1 45 1 19112K 15596K accept 3 72:23 0.00% ss

It's nearing 20MB of allocated heap. Wonder when/where it'll hold. 27M to 30M might not be so bad.

I've also been optimizing various MySQL queries, correcting table definitions from back when I was still a Noob. Removing useless indexes, and adding crucial JOIN indexes. Plus completely rewriting some queries so they examine less data and execute more quickly.



mysql> explain SELECT COUNT(*) AS n FROM (SELECT author,COUNT(*) AS n FROM characters GROUP BY author) AS a WHERE n > 10;
+----+-------------+------------+------+---------------+------+---------+------+-------+---------------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+------------+------+---------------+------+---------+------+-------+---------------------------------+
| 1 | PRIMARY | | ALL | NULL | NULL | NULL | NULL | 326 | Using where |
| 2 | DERIVED | characters | ALL | NULL | NULL | NULL | NULL | 25895 | Using temporary; Using filesort |
+----+-------------+------------+------+---------------+------+---------+------+-------+---------------------------------+
2 rows in set (0.02 sec)

mysql> create index author on characters(author);
Query OK, 25895 rows affected (0.80 sec)
Records: 25895 Duplicates: 0 Warnings: 0

mysql> explain SELECT COUNT(*) AS n FROM (SELECT author,COUNT(*) AS n FROM characters GROUP BY author) AS a WHERE n > 10;
+----+-------------+------------+-------+---------------+--------+---------+------+-------+-------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+------------+-------+---------------+--------+---------+------+-------+-------------+
| 1 | PRIMARY | | ALL | NULL | NULL | NULL | NULL | 326 | Using where |
| 2 | DERIVED | characters | index | NULL | author | 4 | NULL | 25895 | Using index |
+----+-------------+------------+-------+---------------+--------+---------+------+-------+-------------+
2 rows in set (0.01 sec)


Kawaii or NOT?!

Anime Character
Aina
Animemaster1 joined a Dragon Battle
Animemaster1 defeated a Dragon
tghst3250 defeated a Dragon
SK071 wished Mitsuba Okita a Happy Birthday
Rarko wished Blair Labri a Happy Birthday
SK071 joined a Dragon Battle
SK071 defeated a Dragon
SK071 voted Totosai Character of the Day
Heliux faved Nephilia
Natsumimi defeated a Dragon