Ubuntu – Optimized Postgresql like and group by clause
Database: PostgresSQL PostgreSQL 12.11 (Ubuntu 12.11-0ubuntu0.20.04.1) on x86_64-pc-linux-gnu, compiled by gcc (Ubuntu 9.4.0-1ubuntu1~20.04.1) 9.4.0, 64-bit RAM : 8 GB Processor : i7 4510U (dual core 2 Ghz) I would to like to optimized below query select a.gender from "employees" as…