select fields from information_schema.COLUMNS where ....
sqlsql
select fields from information_schema.COLUMNS where ....
sqlsql
you can cache the table field, key, it with the table name, and then set a certain expiration time, because the table field will change less, so it will be better if you don't have to look up the table every time. The table under
information_schema is memory engine and cannot be indexed. It is normal that SQL does not need an index.
see if you need accurate data. If it is not accurate, you can cache the relevant information first.
if you must check the table every time, it is recommended to do it from the database.
1st floor solution-- cache the fields of the table.
can be implemented in redis,memcached.