« first day (2587 days earlier)      last day (1731 days later) » 

12:53 AM
Is it normal that MySQL takes 4 whole seconds to truncate 120 EMPTY tables? (Truncating empty tables just to debug some stuff)
 
 
4 hours later…
4:51 AM
@LucasBustamante only if you had GB quantity of data in it.
 
5:48 AM
@ARr0w I don't. Tables are empty. Weird.
I've been debugging this since I woke up today, 12 hours ago
Not 12... 16, damn
 
what's the issues - 4 seconds to truncate 120 tables?
 
yes - kinda of - it reflects on a performance issue I'm facing on my local environment
Long story short
 
Can you trying rename and drop instead truncate?
38
A: truncate table taking very long time, is it normal?

Kalaiarasan ManimaranTruncate wont work in some cases such as , when you have index kind of things and some foreign key constraints Easy way i suggest is RENAME TABLE table_name TO t1; CREATE TABLE table_name LIKE t1; DROP TABLE t1; or you can also use DELETE FROM table_name;

 
Tried that, takes longer
 
must be your local pc specs?
 
5:52 AM
maybe there is something wrong with your environment - I am not sure how things are working in MySQL/MariaDB
but in SQL Server for example, it is a good practice to have the database log file on other hard drive
truncating is basically fast, but it is minimally log, too and are you sure no one is "touching" the tables when your operation is running?
 
I run an import script dozens of times per day. On OSX it would take 2 seconds to import the dump, on Ubuntu it takes 4. The import happens from host to MySQL docker container, so Ubuntu should be crazy fast
My new build is also faster than my old OSX, with SSD NVMe, etc
I'm pretty sure the bottleneck is coming from MySQL, perhaps mysql-client
But honestly, since it involves both mysql and docker, I'm kinda lost.
The pain is that, in the end, everything I do is twice slower in this new build.
So I'm using MySQL to get to the root of the bottleneck
Because I think it's not very CPUish related... Seems I/O related...
but disk read and write are crazy fast... I'm really missing something here. Anyway... That's it
 
I guess you can find more help here - dba.stackexchange.com
it's forum mainly for DBAs
 
6:20 AM
thanks, I will check that tomorrow
 
 
1 hour later…
7:31 AM
morning guys
 
7:52 AM
Hi, dude
 
Morn
 
8:03 AM
hey guys
sup?
 
 
7 hours later…
2:34 PM
hey @Shaneis
sup?
 
 
4 hours later…
user10864482
6:28 PM
good morning
 

« first day (2587 days earlier)      last day (1731 days later) »