Skip to content

Defer Index Creation [feature request]? #250

Open
@Roguelazer

Description

@Roguelazer

I'm trying to speed up a gh-ost alter of a gigantic table, and I was wondering if you'd considered deferring index creation until after the main backfill? I imagine it'd go a lot faster if the initial table had no indexes, we did the bulk copy of all of the existing rows, then we paused and did a full ALTER TABLE to create the secondary indexes, then gh-ost replayed the binlog to finish the migration.

I could probably do something like this myself by specifying an alter to gh-ost which drops all indexes, then throttling gh-ost through the control socket, when it gets to 99%, running the ALTER TABLE on the _gho table to add the missing indexes, and un-throttling gh-ost once the ALTER finishes in replication, but that seems failure-prone.

Alternatively, if you have any tips for making rewrites go faster on terabyte-scale tables, I'm all ears. :-)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions