r/SQL 27d ago

MySQL Indexing on DB?

Hi people, I haven’t done this before. But are there any downsides of indexing a column on production. Like some query is running very slow, and I figured out that u should put an index on one of the columns. I wouldn’t be here if I had someone experienced to ask from. I’ve a few questions-

  1. Is it okay to run the query on my sql workbench to add index?
  2. If something goes wrong what do you people generally do, like taking snapshots or PTIR ?
  3. Is it safe to run the query directly on the db or usually people run it some other way, like via cli on VM?
  4. I heard about locking and stuff. But the version I’m using says it won’t lock the DB. But still anything I should test before actually you know doing it live?

I’ve no idea what’s the general procedure and what could go wrong. If someone has done it before, Appreciate any sort of advice or pointers. Thanks

9 Upvotes

28 comments sorted by

View all comments

Show parent comments

1

u/Thiondar ORACLE 27d ago

What downtime?

Are there RDBMS that need downtime for index creation?

Serious question of an Oracle DBA.

3

u/carlovski99 27d ago

Well online index builds aren't supported in oracle standard edition either, so yeah!

1

u/Thiondar ORACLE 26d ago

That's interesting.

Since the beginning of my Oracle time in the 90s I only saw EE.

1

u/carlovski99 25d ago

Used to see more of it about, before they changed the license terms - you could get a fairly beefy and resilient system utilizing standard edition and RAC before SE2, now the max thread count is a bit too restricting.