betodealmeida commented on pull request #17360:
URL: https://github.com/apache/superset/pull/17360#issuecomment-977982298


   > > IIRC, there does have some implications on search performance for 
VARCHAR vs TEXT in MySQL. Search w/ indexing is either not possible or much 
slower doe TEXT depending on which storage engine you use and which MySQL 
version you are on.
   > 
   > Thanks for you input, I appreciate as this is not my expertise, I still 
need guidance whether or not we should use a VARCHJAR with a higher number or a 
TEXT for that specific column.
   
   Looks like with MySQL we can use still `TEXT`, but we need to specify a 
length in order to have an index: 
https://dev.mysql.com/doc/refman/8.0/en/create-index.html#create-index-column-prefixes.
 So we could change to `TEXT`, and later still add an index if needed.
   
   Performance-wise there seems to be an extra cost when operating on `TEXT` 
(https://dba.stackexchange.com/a/222182), but I think it's safe to assume that 
we're only going to do simple scans on this table, so it should be fine from 
what I understand.
   
   Since we don't know the maximum expected size of this column I think it's OK 
to:
   
   1. Switch to `TEXT`
   2. If needed in the future add an index prefix, after consulting the 
community on the size


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to