Gemma4 31B Dense Outperforms Qwen3.6 Models for MySQL Query Generation
Test Gemma4 31B Dense for MySQL query generation; Qwen3.6 models underperform in this scenario.
Test Gemma4 31B Dense for MySQL query generation and consider switching from Qwen3.6 for this use case.
Summary
In a recent Reddit comparison, the author tested several large language models for generating MySQL queries. The models evaluated were Qwen3.6 35B A3B MoE, Qwen3.6 27B Dense, Gemma4 26B A4B MoE, and Gemma4 31B Dense, all run with Q4_K_M quantisation and thinking mode enabled. Only Gemma4 31B Dense produced a working query that matched the prompt and did so considerably faster than the Qwen3.6 27B Dense variant. Neither Qwen3.6 35B A3B MoE nor Qwen3.6 27B Dense (even in Q6_K quantisation) succeeded in generating the correct query. The author expressed disappointment with Qwen3.6’s performance despite recent hype, while noting Gemma4’s superior speed and accuracy.
The post highlights that Gemma4 31B Dense is currently the most reliable choice for MySQL query generation among the tested models. It also suggests future testing of PHP code generation, hoping Qwen3.6 might perform better there.
Key changes
- Gemma4 31B Dense generates correct MySQL queries with Q4_K_M quantisation
- Gemma4 31B Dense outperforms Qwen3.6 27B Dense in speed and accuracy
- Qwen3.6 35B A3B MoE fails to produce a working query
- Qwen3.6 27B Dense fails in both Q4_K_M and Q6_K quantisations