I have two tables in my database: page and link. In each one I define that the URL field is UNIQUE because I don’t want repetead URLs.
Being a UNIQUE field, it automatically have an index? Creating an index for these field can speed up the insertions? What is the most appropriate index for a VARCHAR field?
Having a lot of rows can slow the insert because this UNIQUE field? At the moment, I have 1,200,000 rows.
Yes, adding a UNIQUE constraint will create an index:
This won’t speed up your INSERTs though, it will actually slow them down: