We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

How to "stop" get Meta Table from Phalcon Query

Hi, When i logged query from Phalcon to file, i see:

SELECT DISTINCT c.column_name AS Field, c.data_type AS Type, c.character_maximum_length AS Size, c.numeric_precision AS NumericSize, c.numeric_scale AS NumericScale, c.is_nullable AS Null, CASE WHEN pkc.column_name NOTNULL THEN 'PRI' ELSE '' END AS Key, CASE WHEN c.data_type LIKE '%int%' AND c.column_default LIKE '%nextval%' THEN 'auto_increment' ELSE '' END AS Extra, c.ordinal_position AS Position, c.column_default FROM information_schema.columns c LEFT JOIN (SELECT kcu.column_name, kcu.table_name, kcu.table_schema FROM information_schema.table_constraints tc INNER JOIN information_schema.key_column_usage kcu ON (kcu.constraint_name = tc.constraint_name AND kcu.table_name = tc.table_name AND kcu.table_schema = tc.table_schema) WHERE tc.constraint_type = 'PRIMARY KEY') pkc ON (c.column_name = pkc.column_name AND c.table_schema = pkc.table_schema AND c.table_name = pkc.table_name) WHERE c.table_schema = 'public' AND c.table_name = 'user_roles' ORDER BY c.ordinal_position

Can they reduce the performance?

In production, you can use any of these adapters to store the meta-data: https://docs.phalcon.io/en/latest/reference/models.html#caching-meta-data