QUERY PLAN
Aggregate (cost=531.04..531.05 rows=1 width=8)
-> Seq Scan on tbl_api_log a (cost=0.00..521.95 rows=3636 width=0)
Filter: (device_type = '2'::smallint)