QUERY PLAN
Limit (cost=0.28..17.68 rows=20 width=727)
-> Index Scan Backward using tbl_api_log_pkey on tbl_api_log a (cost=0.28..3148.93 rows=3620 width=727)
Filter: (device_type = '2'::smallint)