Question about Switch data type

I naively assumed that the Switch data type would translate to an enum in the underlying DB and so benefit from the advantages of that optimisation. However, I see that it is simply translated to a VARCHAR(160). So that begs the question is there any advantage in using a Switch type over Text? Is there any plan to implement Switch using a mysql native enum in the future?

Hello Daniel!

At GQL API level Switch type and Text type of fields are used for different tasks and for different types of data. I’ll figure out how it works at MySQL level let you know soon.

Lada Kokotova | Technical Support Engineer