ACDB  Log In
Search
Random
Light/Dark Theme
Site Map
Happy Birthday Takao Bucho
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)


Go Top

Anime Characters Database Logo Links

Contribute

This site uses cookies for analytics, personalized content and ads. By continuing to browse this site, you agree to this use. Learn more [close]

Who Board | New Thread

01:02 am
Anonymous
Who is this?

Latest Comments


Dabi

I will do anything to date this guy. - Anonymous

Quotes

Anyway, no matter what you do,
you must beat Lisesharte-sama.
- Airi Arcadia

But even if she hasn't lost to anyone, - Airi Arcadia

that goes for you as well, right, Nii-san? - Airi Arcadia

Anime Art Academy Free Taster Course

Increase your fun by becoming a member today! Login | Register

10 fun things to do on ACDB

Advertise - Share - Mascot - Contact - Discord - API - Wiki - Site Map - Change Log - Twitter - Instagram - Coffee! - Privacy Policy - Rules
All images are copyright of their respective owners. Copyright © Goral Software

Rendered in 3.8 ms. R-13-W-2-M-3199.26 KB