explain.depesz.com

PostgreSQL's explain analyze made readable

Result: jfFc

Settings
# exclusive inclusive rows x rows loops node
1. 0.002 1,192.860 ↓ 0.0 0 1

Limit (cost=37,118.55..37,118.60 rows=20 width=602) (actual time=1,192.860..1,192.860 rows=0 loops=1)

  • Output: id, "createdOn", "modifiedOn", "tenantId", "resourceId", data, "foreignId", status
  • Buffers: shared hit=2,119 read=2,547
2. 0.006 1,192.858 ↓ 0.0 0 1

Sort (cost=37,118.55..37,118.63 rows=33 width=602) (actual time=1,192.858..1,192.858 rows=0 loops=1)

  • Output: id, "createdOn", "modifiedOn", "tenantId", "resourceId", data, "foreignId", status
  • Sort Key: "ResourceImg"."modifiedOn" DESC
  • Sort Method: quicksort Memory: 25kB
  • Buffers: shared hit=2,119 read=2,547
3. 14.719 1,192.852 ↓ 0.0 0 1

Bitmap Heap Scan on public."ResourceImg" (cost=16,350.46..37,117.72 rows=33 width=602) (actual time=1,192.852..1,192.852 rows=0 loops=1)

  • Output: id, "createdOn", "modifiedOn", "tenantId", "resourceId", data, "foreignId", status
  • Recheck Cond: ((("ResourceImg"."resourceId")::text = 'rc-56ade216e1d74e23908551ddf5abd2d6'::text) AND (("ResourceImg"."tenantId")::text = 'tn-dda47a9add4a40b6ba25f70e2e1bcca9'::text))
  • Filter: ((("ResourceImg".status)::text = 'ACTIVE'::text) AND (("ResourceImg".data #>> '{mail}'::text[]) = 'guowen1@cnegroup.com'::text))
  • Rows Removed by Filter: 27,237
  • Heap Blocks: exact=2,117
  • Buffers: shared hit=2,119 read=2,547
4. 1,082.472 1,178.133 ↓ 0.0 0 1

BitmapAnd (cost=16,350.46..16,350.46 rows=7,128 width=0) (actual time=1,178.133..1,178.133 rows=0 loops=1)

  • Buffers: shared hit=2 read=2,547
  • -> Bitmap Index Scan on resourceimg_tenantid_index (cost=0.00..14323.23 rows=219,558 width=0) (actual time=1,082.006..1082.006 rows=221,743 loops=1) ---这里是最奇怪的地方
5. 95.661 95.661 ↓ 1.1 27,237 1

Bitmap Index Scan on resourceimg_resourceid_foreignid_uindex (cost=0.00..2,026.96 rows=25,921 width=0) (actual time=95.661..95.661 rows=27,237 loops=1)

  • Index Cond: (("ResourceImg"."resourceId")::text = 'rc-56ade216e1d74e23908551ddf5abd2d6'::text)
  • Buffers: shared hit=2 read=305
  • Index Cond: (("ResourceImg"."tenantId")::text = 'tn-dda47a9add4a40b6ba25f70e2e1bcca9'::text)
  • Buffers: shared read=2,242
Planning time : 0.133 ms
Execution time : 1,192.894 ms