Sample Header Ad - 728x90

Time taken to drop/add index is lesser than adding a column. Why is that?

0 votes
2 answers
1513 views
I'm using 10.1.25-MariaDB-1~xenial, but engine is innodb though. I'm performing an alter by default it does ONLINE alter. When I add column it takes at least 50 mins for 50G table in our infrastructure, but when I performed removing and adding a composite index of 3 columns it took 8 mins. Any idea internals of what it is doing? Also does the duration changes if I'm adding an PK index/UK index.
Asked by Mannoj (1581 rep)
Dec 10, 2018, 08:35 AM
Last activity: Apr 13, 2023, 02:03 AM