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

更新SQL导出支持

This commit is contained in:
2022-10-26 16:19:46 +08:00
parent aa5e239155
commit 66d5f89b02
10 changed files with 599 additions and 50 deletions

View File

@@ -69,6 +69,39 @@ ORDER BY s DESC
-- 查看本地已有 song 的分布
SELECT cast( format( song_id / 10000000, 0) * 10000000 as UNSIGNED ) as s, count(*) as count
FROM song
GROUP BY s
ORDER BY s DESC
-- 查看本地已有 user 的分布
SELECT cast( format( user_id / 10000000, 0) * 10000000 as UNSIGNED ) as s, count(*) as count
FROM user
GROUP BY s
ORDER BY s DESC
-- 查看本地已有 album 的分布
SELECT cast( format( album_id / 1000000, 0) * 1000000 as UNSIGNED ) as s, count(*) as count
FROM 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 artist
GROUP BY s
ORDER BY s DESC
-- 查看本地已有 playlist 的分布
SELECT cast( format( playlist_id / 2000000, 0) * 2000000 as UNSIGNED ) as s, count(*) as count
FROM playlist
GROUP BY s
ORDER BY s DESC
-- optimize table
optimize table analysis;
optimize table album;