News
| Character Comments | Jul 31, 2011 | Rei |
Updated the Character Comments Presentation:
http://www.animecharactersdatabase.com/charactercomments.php
We had been using a DL DT DD style of comment I borrowed from TPB. In the end, it kinda sucked. Fun using a seldom used HTML 4.01 element tho.
http://www.animecharactersdatabase.com/charactercomments.php
We had been using a DL DT DD style of comment I borrowed from TPB. In the end, it kinda sucked. Fun using a seldom used HTML 4.01 element tho.
| 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)
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)
| Hair Up | Jul 28, 2011 | Rei |
Added a new search trait, Hair Up.
Indexed roughly a hundred into it as well.
Also found a new type of SQL Injection on the site. Pretty nasty. It's a very complicated coding error, one I'm sure many other sites will be vulnerable to.
I may look over some old logs, see if anyone tried anything with it.
Having failed queries appear in the error log finally paid off though.
Indexed roughly a hundred into it as well.
Also found a new type of SQL Injection on the site. Pretty nasty. It's a very complicated coding error, one I'm sure many other sites will be vulnerable to.
I may look over some old logs, see if anyone tried anything with it.
Having failed queries appear in the error log finally paid off though.
Kawaii or NOT?!
| Icould_bethereasonwhy joined |