eksopl / fuuka

Fuuka Imageboard Archiver
http://code.google.com/p/fuuka/
Other
58 stars 7 forks source link

Make some of the reports update in real time #14

Closed eksopl closed 12 years ago

eksopl commented 12 years ago

Some of the reports run prohibitively expensive SQL queries. This can and should be mitigated by having triggers and auxiliary tables that track said data on the fly.

Supporting better DB engines in the future will also depends on this, since count(*)s tend to be very expensive in good DBs. InnoDB on MySQL and PostgreSQL behave that way, for example.

eksopl commented 12 years ago

I am not looking forward to porting all this shit to PL/pgSQL.

Then again, I am not enjoying writing this in MySQL's stored procedure/trigger syntax either.

eksopl commented 12 years ago

That sure took a buttload of effort and quite boring SQL -OMGOPTIMIZED queries, but the result seems to be quite good. Testing in devel.