query the rows in a postgres table code example Example: postgresql select fast check no rows select exists (select 1 from mytable)