osuAkatsuki / bancho.py

An osu! server for the generic public, optimized for maintainability in modern python
https://akatsuki.gg
MIT License
201 stars 125 forks source link

Hacky/quick generation of fake data for perf testing (requries db resets) #647

Closed cmyui closed 4 months ago

cmyui commented 4 months ago

Describe your changes

Related Issues / Projects

Checklist

GamebP commented 4 months ago

Is this going to work?

cmyui commented 4 months ago

Yeah it works -- I used this for #642. I don't plan to merge this, it's pretty hacky (and requires a db reset) lol, just wanted to check the diff.

GamebP commented 3 months ago

Hey, do you know why trimming one table, takes a long time to do it. I think my wsl ubuntu is fcked...

minisbett commented 3 months ago

Hey, do you know why trimming one table, takes a long time to do it. I think my wsl ubuntu is fcked...

Not related to this PR or bpy, please ask on the Discord instead or google. But just drop the table and re-create it.

7ez commented 3 months ago

Hey, do you know why trimming one table, takes a long time to do it. I think my wsl ubuntu is fcked...

Not related to this PR or bpy, please ask on the Discord instead or google. But just drop the table and re-create it.

DELETE FROM table:

minisbett commented 3 months ago

Hey, do you know why trimming one table, takes a long time to do it. I think my wsl ubuntu is fcked...

Not related to this PR or bpy, please ask on the Discord instead or google. But just drop the table and re-create it.

DELETE FROM table:

that's even slower than truncating because of the way it deallocates + it writes to the undo log

7ez commented 3 months ago

Hey, do you know why trimming one table, takes a long time to do it. I think my wsl ubuntu is fcked...

Not related to this PR or bpy, please ask on the Discord instead or google. But just drop the table and re-create it.

DELETE FROM table:

that's even slower than truncating because of the way it deallocates + it writes to the undo log

If you do it in a transaction then not really lol

minisbett commented 3 months ago

Hey, do you know why trimming one table, takes a long time to do it. I think my wsl ubuntu is fcked...

Not related to this PR or bpy, please ask on the Discord instead or google. But just drop the table and re-create it.

DELETE FROM table:

that's even slower than truncating because of the way it deallocates + it writes to the undo log

If you do it in a transaction then not really lol

I don't think transactions have anything to do with this. On DELETE, every row is locked separately, while TRUNCATE locks the whole table.

GamebP commented 3 months ago

truncate tries to delete the data but sometimes gives an error to fix it