1
0
Code Issues Pull Requests Projects Releases Wiki Activity GitHub Gitee

修改SQL的一些无关紧要的小问题

This commit is contained in:
程序员小墨 2022-11-09 16:14:10 +08:00
parent f4cdef2935
commit 6582bf8d40
2 changed files with 21 additions and 21 deletions

View File

@ -100,7 +100,7 @@ let outputArr = [];
var a = fs.readFileSync(path.join(__dirname, `distribution_range/user.txt`), "utf-8").trim().split("\n").reverse().map(i => i.trim());
// a = a.filter((val, index) => index % 15 == 0); // 抽掉一些边界 不然SQL太多了
for (let i = 0; i < a.length; i++) {
outputArr.push(`start cmd /k "node index --utils comment --min ${a[i]} --max ${a[i + 1]} --limit 10000";`);
outputArr.push(`start cmd /k "node index --utils comment --min ${a[i]} --max ${a[i + 1]} --limit 10000"`);
}
outputArr.push("echo done.");
console.log(outputArr.join('\n'));

View File

@ -55,68 +55,68 @@ INSERT IGNORE INTO wait_check_album (id) SELECT album_id FROM song_album_rela
-- 查看需要爬取的 song 的分布
SELECT cast( format( id / 10000000, 0) * 10000000 as UNSIGNED ) as s, count(*) as count
SELECT cast( FLOOR( id / 10000000 ) * 10000000 as UNSIGNED ) as s, count(*) as count
FROM wait_fetch_song
GROUP BY s
ORDER BY s DESC
ORDER BY s DESC;
-- 查看需要爬取的 album 的分布
SELECT cast( format( id / 1000000, 0) * 1000000 as UNSIGNED ) as s, count(*) as count
SELECT cast( FLOOR( id / 1000000 ) * 1000000 as UNSIGNED ) as s, count(*) as count
FROM wait_fetch_album
GROUP BY s
ORDER BY s DESC
ORDER BY s DESC;
-- 查看需要爬取的 artist 的分布
SELECT cast( format( id / 100000, 0) * 100000 as UNSIGNED ) as s, count(*) as count
SELECT cast( FLOOR(id / 100000 ) * 100000 as UNSIGNED ) as s, count(*) as count
FROM wait_fetch_artist
GROUP BY s
ORDER BY s DESC
ORDER BY s DESC;
-- 查看需要爬取的 comment 的分布
SELECT cast( format( song_id / 10000000, 0) * 10000000 as UNSIGNED ) as s, count(*) as count
SELECT cast( FLOOR( song_id / 10000000 ) * 10000000 as UNSIGNED ) as s, count(*) as count
FROM comment_progress
WHERE current_status != 2
GROUP BY s
ORDER BY s DESC
ORDER BY s DESC;
-- 查看需要爬取的 lyric 的分布
SELECT cast( format( id / 10000000, 0) * 10000000 as UNSIGNED ) as s, count(*) as count
SELECT cast( FLOOR( id / 10000000 ) * 10000000 as UNSIGNED ) as s, count(*) as count
FROM wait_fetch_lyric
GROUP BY s
ORDER BY s DESC
ORDER BY s DESC;
-- 查看本地已有 song 的分布
SELECT cast( format( song_id / 10000000, 0) * 10000000 as UNSIGNED ) as s, count(*) as count
SELECT cast( FLOOR( song_id / 10000000 ) * 10000000 as UNSIGNED ) as s, count(*) as count
FROM song
GROUP BY s
ORDER BY s DESC
ORDER BY s DESC;
-- 查看本地已有 user 的分布
SELECT cast( format( user_id / 10000000, 0) * 10000000 as UNSIGNED ) as s, count(*) as count
SELECT cast( FLOOR( user_id / 10000000 ) * 10000000 as UNSIGNED ) as s, count(*) as count
FROM user
GROUP BY s
ORDER BY s DESC
ORDER BY s DESC;
-- 查看本地已有 album 的分布
SELECT cast( format( album_id / 1000000, 0) * 1000000 as UNSIGNED ) as s, count(*) as count
SELECT cast( FLOOR( album_id / 1000000 ) * 1000000 as UNSIGNED ) as s, count(*) as count
FROM album
GROUP BY s
ORDER BY s DESC
ORDER BY s DESC;
-- 查看本地已有 artist 的分布
SELECT cast( format( artist_id / 2000000, 0) * 2000000 as UNSIGNED ) as s, count(*) as count
SELECT cast( FLOOR( artist_id / 2000000 ) * 2000000 as UNSIGNED ) as s, count(*) as count
FROM artist
GROUP BY s
ORDER BY s DESC
ORDER BY s DESC;
-- 查看本地已有 playlist 的分布
SELECT cast( format( playlist_id / 2000000, 0) * 2000000 as UNSIGNED ) as s, count(*) as count
SELECT cast( FLOOR( playlist_id / 2000000 ) * 2000000 as UNSIGNED ) as s, count(*) as count
FROM playlist
GROUP BY s
ORDER BY s DESC
ORDER BY s DESC;