Andrey Raboy2020-02-11 11:56:54
Andrey Raboy, 2020-02-11 11:56:54

After deleting a MySQL table, do indexes persist?

Hello, there is a very confusing story, there is a script that deletes a table once a day, creates it and fills it with data. I did not see the script itself, it is not available to me, but the record IDs always change and start from 0 - apparently the table is being deleted.

I need to process these records, 64,000, it is processing, everything is ok, but the load on the server is heavy ... the hoster swears, waves his hand, etc.

Hence two questions:
1. Is there a big load when creating an index for a 64K table on a text field?
2. Is the index dropped when the table is dropped?
went to chemistry with sql while writing - the idea came, but I will be grateful for enlightenment!

Answer the question

In order to leave comments, you need to log in

3 answer(s)
DevMan, 2020-02-11

are removed.
but 0 can be obtained without deletion. just truncate.
the load can be caused not by a table without indexes (65k records - quite a bit), but by a processing script that is built incorrectly.

Alexander Aksentiev, 2020-02-11

heavy load on the server

the load is definitely not from 64k records in the database, but obviously from what the script does with these records or before creating them, because 64k records are nothing even for a share for 50 rubles on which hosters wave their hands.

Andrey Raboy, 2020-02-11

Ok, I corrected the script a little, I probably did something stupid)))
I will write off the result.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question