SQLAI.ai is a general-purpose AI tool for generating, editing, explaining and optimizing SQL and NoSQL queries, with support for a range of databases including MySQL, PostgreSQL and others. It can help with query optimization, syntax error checking and query explanation, and is geared for developers, data analysts and others who want to improve productivity.
Another powerful option is EverSQL, which is geared for optimizing PostgreSQL and MySQL database performance in real time. It offers continuous performance monitoring, automatic query optimization and cost savings through schema optimization. It's geared for database administrators and developers who want to automate query optimization without manual work.
If you want a more general-purpose tool, AI2SQL offers AI-based SQL code generation, query optimization and syntax checking for several databases, including SQL Server, MySQL and PostgreSQL. It also offers ER diagram conversion and query explanation abilities, which could be useful for data analysis and learning SQL.