修改统计语句
This commit is contained in:
parent
2878dbf111
commit
0b887580fc
@ -1,10 +1,10 @@
|
||||
start cmd /k "node index --utils assistant"
|
||||
|
||||
start cmd /k "node index --utils song"
|
||||
start cmd /k "node index --utils album"
|
||||
start cmd /k "node index --utils artist"
|
||||
start cmd /k "node index --utils album --limit 10000"
|
||||
start cmd /k "node index --utils artist --limit 10000"
|
||||
start cmd /k "node index --utils comment --limit 10000"
|
||||
start cmd /k "node index --utils lyric"
|
||||
start cmd /k "node index --utils lyric --limit 10000"
|
||||
|
||||
@REM start cmd /k "node index --utils playlist"
|
||||
exit
|
@ -3,9 +3,6 @@
|
||||
DELETE FROM analysis WHERE `key` LIKE '%_old';
|
||||
UPDATE analysis SET `key`=concat(`key`,'_old'), modify_time=modify_time WHERE `key` NOT LIKE '%_old';
|
||||
INSERT INTO analysis (`key`, `value`) VALUES ('songCount', (SELECT count(*) as count FROM song) ) ON DUPLICATE KEY UPDATE `value` = VALUES(`value`);
|
||||
-- INSERT INTO analysis (`key`, `value`) VALUES ('songWaiting', (SELECT count(DISTINCT song_id) AS count
|
||||
-- FROM ( SELECT song_id FROM song_artist_relation UNION SELECT song_id FROM song_album_relation ) t_tmp
|
||||
-- WHERE song_id NOT IN ( SELECT song_id FROM song )) ) ON DUPLICATE KEY UPDATE `value` = VALUES(`value`);
|
||||
INSERT INTO analysis (`key`, `value`) VALUES ('songWaiting', (SELECT count(*) as count FROM wait_fetch_song) ) ON DUPLICATE KEY UPDATE `value` = VALUES(`value`);
|
||||
INSERT INTO analysis (`key`, `value`) VALUES ('playlistCount', (SELECT count(*) AS count FROM playlist) ) ON DUPLICATE KEY UPDATE `value` = VALUES(`value`);
|
||||
INSERT INTO analysis (`key`, `value`) VALUES ('albumCount', (SELECT count(*) as count FROM album) ) ON DUPLICATE KEY UPDATE `value` = VALUES(`value`);
|
||||
@ -57,27 +54,20 @@ INSERT IGNORE INTO wait_check_album (id) SELECT album_id FROM song_album_rela
|
||||
|
||||
|
||||
-- 查看需要爬取的 song 的分布
|
||||
SELECT cast( format( t_tmp.song_id / 10000000, 0) * 10000000 as UNSIGNED ) as s, count(*) as count
|
||||
FROM (
|
||||
SELECT DISTINCT song_id FROM song_album_relation
|
||||
UNION
|
||||
SELECT DISTINCT song_id FROM song_artist_relation
|
||||
) as t_tmp
|
||||
WHERE song_id NOT IN ( SELECT song_id FROM song )
|
||||
SELECT cast( format( id / 10000000, 0) * 10000000 as UNSIGNED ) as s, count(*) as count
|
||||
FROM wait_fetch_song
|
||||
GROUP BY s
|
||||
ORDER BY s DESC
|
||||
|
||||
-- 查看需要爬取的 album 的分布
|
||||
SELECT cast( format( album_id / 1000000, 0) * 1000000 as UNSIGNED ) as s, count(*) as count
|
||||
FROM song_album_relation
|
||||
WHERE album_id NOT IN ( SELECT album_id FROM album )
|
||||
SELECT cast( format( id / 1000000, 0) * 1000000 as UNSIGNED ) as s, count(*) as count
|
||||
FROM wait_fetch_album
|
||||
GROUP BY s
|
||||
ORDER BY s DESC
|
||||
|
||||
-- 查看需要爬取的 artist 的分布
|
||||
SELECT cast( format( artist_id / 2000000, 0) * 2000000 as UNSIGNED ) as s, count(*) as count
|
||||
FROM song_artist_relation
|
||||
WHERE artist_id NOT IN ( SELECT artist_id FROM artist )
|
||||
SELECT cast( format( id / 1000000, 0) * 1000000 as UNSIGNED ) as s, count(*) as count
|
||||
FROM wait_fetch_artist
|
||||
GROUP BY s
|
||||
ORDER BY s DESC
|
||||
|
||||
@ -89,9 +79,8 @@ GROUP BY s
|
||||
ORDER BY s DESC
|
||||
|
||||
-- 查看需要爬取的 lyric 的分布
|
||||
SELECT cast( format( song_id / 10000000, 0) * 10000000 as UNSIGNED ) as s, count(*) as count
|
||||
FROM song
|
||||
WHERE song_id NOT IN ( SELECT song_id FROM lyric )
|
||||
SELECT cast( format( id / 10000000, 0) * 10000000 as UNSIGNED ) as s, count(*) as count
|
||||
FROM wait_fetch_lyric
|
||||
GROUP BY s
|
||||
ORDER BY s DESC
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user