DrQuincy Posted April 26, 2022 Share Posted April 26, 2022 In my recent question about utf8mb4, I was asking about columns being lowered from 255 to 250. I misunderstood since I've just realised for some time VARCHAR can go way beyond 250 anyway so none of them in the database dump would be affected. The 250 in that quote is referring to column_name values for indexes. Many of PW's tables for fields have indexes: data_exact, BTREE data(250) data, FULLTEXT, data I presume it just uses data or data_exact based on type of selector used (natural language or exact). I've never specified an index length when using BTREE though and didn't realise there was a limit (though databases aren't my strong point). Does this just mean that if you do an exact search it will only apply to the first 250 characters of what is in data? If so, why explicitly set a limit? Wouldn't MySQL just default it to 250 anyway — or if you're in strict mode does it cause errors? I guess when setting up a database myself I would almost always use BTREE on relations where it's just an int, so would never run into this limitation. Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now