
After switching from MySQL to PostgreSQL for a project needing full-text search and JSON storage, the author found PostgreSQL's capabilities superior. PostgreSQL’s `jsonb` type allows for efficient indexing and querying, making complex data interactions seamless. The built-in full-text search with `tsvector` and `tsquery` provided adequate search functionality without external services. Additionally, the introduction of `pgvector` enables the storage of AI embeddings and similarity searches directly within the database, streamlining infrastructure. While MySQL remains effective for high-traffic read-heavy applications, PostgreSQL is recommended for new projects involving AI and complex data scenarios due to its robust feature set and future-proofing.
Cary Li
For years I defaulted to MySQL — it was what I learned first, and it worked fine. But after switching to PostgreSQL for a recent project, I don't think I'm going back.
The project needed full-text search and JSON storage. MySQL can handle both, but the experience felt like a workaround. PostgreSQL treats them as first-class citizens.
JSON support is genuinely good. The jsonb type isn't just storage — you can index it, query inside it, and use operators that make complex queries readable. MySQL's JSON support works but feels bolted on.
Full-text search is built in and flexible. With tsvector and tsquery, I got decent search without pulling in a separate service. Not Elasticsearch-level, but good enough for most apps.
pgvector changed everything for AI projects. Being able to store embeddings and run similarity search in the same database where my other data lives is a big deal. No extra infrastructure, no sync issues.
If you're running a high-traffic read-heavy workload and have existing MySQL expertise on the team, there's no urgent reason to switch. MySQL is fast and well-understood.
For new projects — especially anything touching AI, search, or complex data shapes — PostgreSQL is the better default. The ecosystem has caught up, the tooling is great, and features like pgvector make it future-proof in a way MySQL isn't.