Created
July 11, 2019 17:37
-
-
Save EvanCarroll/44469d42a6e5b6e46207d1f0eada7e97 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ecarroll=# explain SELECT j1.*, jsonb_typeof(j1.value) FROM jsonb_array_elements('[ 7,2, [6,7], 2,10 ]'::jsonb) AS j1 LEFT OUTER JOIN LATERAL jsonb_array_elements(j1."value") ON jsonb_typeof(j1.value) = 'array'; | |
QUERY PLAN | |
------------------------------------------------------------------------------------- | |
Nested Loop Left Join (cost=0.01..251.25 rows=100 width=64) | |
Join Filter: (jsonb_typeof(j1.value) = 'array'::text) | |
-> Function Scan on jsonb_array_elements j1 (cost=0.00..1.00 rows=100 width=32) | |
-> Function Scan on jsonb_array_elements (cost=0.00..1.00 rows=100 width=0) | |
(4 rows) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment