Age | Commit message (Collapse) | Author | Files | Lines |
|
The database has grown and we're on SSDs now, so it's good to revisit
these timings and see what needs optimizing, if anything.
|
|
That should be the last thing to convert to the new schema.
|
|
Turns out that fetching whether or not you have unread notifications
(done on every pageview if you're logged in) was pretty slow. The index
speeds up both that query and the "my notifications" view.
The extra purge for old notifications for users with more than 500
notifications ensures that the index stays effective for the unread
notifications count. Otherwise it'll have to read half of the
notifications table anyway to check the 'unread' filter.
|
|
AE::timer accepts a time interval as argument, not a complete
timestamp. So the monthly cron job hasn't run in a while...
|
|
|
|
|
|
Easier to work with in custom queries.
|
|
The usercache maintenance cron is causing significant downtime each
month, so I've disabled it for now.
|
|
|
|
In particular, don't run the tasks when I'm asleep. The SQL queries that
are run during maintenance can deadlock and cause multi to crash. I want
to be awake when that happens.
|
|
Required in order to search for hidden entries (obviously :P)
|
|
|
|
|
|
I'd really prefer incremental updates, but I'll first need to find a
proper algorithm...
|
|
|
|
|
|
This adds a new column to the vn table: c_search, which holds the
normalized titles for speedy search results using LIKE.
Also split some functions from VNDB::Func that didn't require YAWF into
a VNDBUtil module, so Multi can also make use of them. The normalization
functions are the same for Multi and VNDB, after all.
The API and Multi::IRC still use the old search, these should be updated
as well.
|
|
|
|
past 5 days
And run only run a full update_vncache() monthly.
This was the last daily cron that took quite a while to run, the
complete daily cron time has now been reduced from about 90 seconds to
about 5 seconds.
|
|
To batch update, simply do a
SELECT update_vncache(id) FROM vn;
The function is now more readable as well.
|
|
This is more efficient, and doesn't require the tag_tree() or
tag_vn_childs() stored procedures. Does require PostgreSQL 8.4+
|
|
avg_rating should be the average rating of all VNs, not the global average
vote.
|
|
They still have influence on the average number of votes per VN and the
overall average vote, but this isn't significant. (at least, not at the
moment)
|
|
Was a good idea after all...
|
|
The changes.rev column should be correct in the first place, and in the
(most likely) impossible condition that it isn't, the update_rev()
function is more likely to make things worse.
|
|
TODO:
- document the relations
- emit a relgraph notify when needed
|
|
As the same table can easily be used to store producer relation graphs
as well.
|
|
|
|
And updated some comments while I was at it
|
|
Requires the new PoCo-Pg
|
|
Everything now uses Async SQL access, and doesn't rely on
POE::Component::Cron anymore.
I removed a few maintenance functions that weren't needed. Warning for
unkanime is already done by Multi::Anime, and integrity checking should
really be done in PgSQL.
The tag<->vn cache is now also regenerated daily rather than hourly.
|
|
|
|
|
|
Updated hourly by Multi.
May want to look for a better way to update this cache, because I'm
afraid the current tags_vn_calc() is going to perform very badly on
larger databases.
|
|
|
|
May actually be a better idea to just log a HUGE WARNING in case
the cached values don't match the actual values, as that really
shouldn't happen. But oh well, updating is fine, too. Makes sure
everything stays correct in the long term.
|
|
|
|
git-svn-id: svn://vndb.org/vndb@81 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
|
|
git-svn-id: svn://vndb.org/vndb@64 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
|
|
from Multi
git-svn-id: svn://vndb.org/vndb@63 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
|
|
git-svn-id: svn://vndb.org/vndb@50 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
|
|
released titles. Fixed Multi::IRC to catch dx.x IDs without matching version numbers
git-svn-id: svn://vndb.org/vndb@18 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
|
|
often -.-)
git-svn-id: svn://vndb.org/vndb@13 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
|
|
git-svn-id: svn://vndb.org/vndb@11 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
|
|
git-svn-id: svn://vndb.org/vndb@9 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
|
|
git-svn-id: svn://vndb.org/vndb@5 1fe2e327-d9db-4752-bcf7-ef0cb4a1748b
|