Oystein Kristoffer Tveit oysteikt
oysteikt pushed to main at Projects/muscl 2026-05-30 19:01:52 +02:00
43e4cc45ca server/sql: great performance improvements for listing databases
oysteikt commented on issue Projects/muscl#210 2026-05-30 18:35:22 +02:00
show-db is unreasonably slow, figure out why

This seems to be it

pub async fn list_all_databases_for_user(
unix_user: &UnixUser,
connection: &mut MySqlConnection,
_db_is_mariadb: bool,
group_denylist: &GroupDenylist,
) -> ListAllDatabasesResponse {
let result = sqlx::query_as::<_, DatabaseRow>(
r"
SELECT
CAST(`information_schema`.`SCHEMATA`.`SCHEMA_NAME` AS CHAR(64)) AS `database`,
GROUP_CONCAT(DISTINCT CAST(`information_schema`.`TABLES`.`TABLE_NAME` AS CHAR(64)) SEPARATOR ',') AS `tables`,
GROUP_CONCAT(DISTINCT CAST(`mysql`.`db`.`User` AS CHAR(64)) SEPARATOR ',') AS `users`,
MAX(`information_schema`.`SCHEMATA`.`DEFAULT_COLLATION_NAME`) AS `collation`,
MAX(`information_schema`.`SCHEMATA`.`DEFAULT_CHARACTER_SET_NAME`) AS `character_set`,
CAST(IFNULL(
SUM(`information_schema`.`TABLES`.`DATA_LENGTH` + `information_schema`.`TABLES`.`INDEX_LENGTH`),
0
) AS UNSIGNED INTEGER) AS `size_bytes`
FROM `information_schema`.`SCHEMATA`
LEFT OUTER JOIN `information_schema`.`TABLES`
ON `information_schema`.`SCHEMATA`.`SCHEMA_NAME` = `TABLES`.`TABLE_SCHEMA`
LEFT OUTER JOIN `mysql`.`db`
ON `information_schema`.`SCHEMATA`.`SCHEMA_NAME` = `mysql`.`db`.`DB`
WHERE `information_schema`.`SCHEMATA`.`SCHEMA_NAME` NOT IN ('information_schema', 'performance_schema', 'mysql', 'sys')
AND `information_schema`.`SCHEMATA`.`SCHEMA_NAME` REGEXP ?
GROUP BY `information_schema`.`SCHEMATA`.`SCHEMA_NAME`
",
)
.bind(create_user_group_matching_regex(unix_user, group_denylist))
.fetch_all(connection)
.await
.map_err(|err| ListAllDatabasesError::MySqlError(err.to_string()));

oysteikt commented on issue Projects/muscl#210 2026-05-30 18:32:50 +02:00
show-db is unreasonably slow, figure out why
May 30 18:31:18 isvegg muscl-server[1000070]: Request:
                                              {
                                                "ListDatabases": null
               …
oysteikt opened issue Projects/muscl#210 2026-05-30 18:20:37 +02:00
show-db is unreasonably slow, figure out why
oysteikt commented on issue Projects/muscl#201 2026-05-30 18:15:13 +02:00
Build for ubuntu 26.04 - resolute racoon

Depends on Drift/issues#356

oysteikt pushed to main at Projects/muscl 2026-05-30 17:45:01 +02:00
62b1b66bb6 CHANGELOG.md: fix broken link
oysteikt pushed tag v1.0.2 to Projects/muscl 2026-05-30 17:41:41 +02:00
oysteikt released v1.0.2 at Projects/muscl 2026-05-30 17:41:41 +02:00
oysteikt commented on issue mugiten/mugiten#203 2026-05-30 17:34:31 +02:00
Replace SQLite linked lists with BASIC-like arrays

Implementation is done, but we need to keep parts of the old implementation around for #104

oysteikt pushed to basic-style-library-lists at mugiten/mugiten 2026-05-30 17:33:35 +02:00
7cf8048431 models/library_list: replace linked lists with BASIC style lists
oysteikt pushed to main at Projects/muscl 2026-05-30 17:25:01 +02:00
f16239aceb server/sql: fixes for new sqlx crate version
oysteikt pushed to basic-style-library-lists at mugiten/mugiten 2026-05-30 17:13:03 +02:00
bf45d796ba fixup! WIP
oysteikt pushed to main at Projects/muscl 2026-05-30 17:10:03 +02:00
8f475eced1 CHANGELOG.md: add release notes, Cargo.toml: bump version number
6849e99c11 flake.lock: bump, Cargo.{toml,lock}: update inputs
Compare 2 commits »
oysteikt pushed to basic-style-library-lists at mugiten/mugiten 2026-05-30 14:50:19 +02:00
b9018be651 fixup! WIP
oysteikt opened issue mugiten/mugiten#209 2026-05-30 14:23:56 +02:00
Implement reordering algorithm for BASIC lists
oysteikt opened issue mugiten/mugiten#208 2026-05-30 14:23:23 +02:00
Test size getters and "get page" functions with unbalanced pages
oysteikt opened issue mugiten/mugiten#207 2026-05-30 14:22:32 +02:00
Test rebalancing algorithms
oysteikt pushed to basic-style-library-lists at mugiten/mugiten 2026-05-30 14:21:04 +02:00
oysteikt opened issue frero/hanabi#1 2026-05-30 13:02:48 +02:00
License 🙏
oysteikt pushed to basic-style-library-lists at mugiten/mugiten 2026-05-30 11:30:30 +02:00