Untitled

mail@pastecode.io avatar
unknown
plain_text
7 months ago
13 kB
5
Indexable
Never
SELECT * FROM bb_farm_polygons WHERE uuid NOT IN (SELECT unnest(parent_farm_uuids) FROM bb_farm_polygons WHERE insert_ts<=%refTs% AND loc_uuid=ANY(ARRAY['469c1cb2-334e-4cdc-897d-5220b23282c8',
'32715c84-b9dc-4661-ae3d-85d6557ba7ea',
'eb1b9f3e-d5cf-4eba-a4bc-d057ab171b67',
'553e95b8-af78-4bcb-9fec-cb5d5e8421df',
'55579e9d-4e09-46b1-8a10-3fb92582d408',
'f1c2490e-7182-4e39-9ff1-acb8d42c2ecc',
'87587313-3059-4953-bd3a-89783abdaffc',
'd6c65255-56fb-4d9f-889a-d7a4277f19bf',
'35870352-d8c3-45df-80aa-1647457cd4ca',
'11b8dae7-cdb9-4961-a272-91193bda5f98',
'00375a93-b73f-4ff7-a661-afb6a2fd9da8',
'f58772d8-b51f-46cc-bcba-4f57b883ae1b',
'99f5ab05-3e64-4fa5-8ccb-8bdd42f2c196',
'71bbccbf-ef7a-4424-ac21-40a6ff76c90f',
'b0e8ccb1-07dc-41e0-92d1-3cfbb0563a12',
'e33138d6-6e33-4cac-b61a-4ce958ba100b',
'50e27812-a44c-42b8-9812-349c59874e3f',
'a048d767-fe1e-4c10-b4f0-917c273b208f',
'092d1f83-c220-4a67-8f7a-218929e186e3',
'9983e171-d055-4307-ba5f-959bb2c2abc5',
'a5aa53b1-fcf9-4f78-9424-60720af3c2c5',
'bb131a23-ddf6-41d4-a7a4-0d3251957d95',
'6b47242e-c6ef-4b74-b25a-52be4a117df6',
'696abc4f-69b3-46f4-9a8b-4d4de1c2b592',
'ab2c80cf-8878-420e-a5df-4b698db49083',
'9eb1b927-e6c9-4608-8c4c-9d95625fa4a6',
'4ac8c83a-6a95-4726-9066-1852199ce355',
'd46e17a4-f4d1-4ceb-82fe-f56a179a9c76',
'adefc580-5ce7-4a01-bda3-7458a16f6775',
'da87947e-5d34-46ff-9a27-899a5f684807',
'717c39d8-05bf-435c-ad5e-2fd031397817',
'e60d8ec0-fcdb-4ff9-aa68-b4a10ea9d1ac',
'27b7b459-7be9-49ce-bf7e-f1b3b6149e43',
'ffc4b6b6-b410-4bb3-aeb8-0927da8a94a6',
'c0c8e0ce-bdea-4a8a-b817-46b1b3530909',
'09c2b790-796e-485b-8301-03359d01ed96',
'3ea4476f-0412-4216-86f3-b9b550f14511',
'e5198fe4-0844-4bb2-863f-440da97ebd04',
'b949d7b0-749e-4cd4-9fe3-5664e11c97d3',
'86ca927a-a7dd-424a-856b-691d89ebcb4c',
'0321aa82-5f1f-4e4f-8f81-e93baa162011',
'75a80ba9-e885-4f6d-9c61-a6b7ea635094',
'13d06c42-ddf0-4289-8530-9890a8a790d2',
'13ffe813-94da-4d66-86c1-f9b09cc688d5',
'877dd09a-8d31-4d12-984d-11c8330597a6',
'd79d3f2a-5d9e-4bc7-b20e-b0fe53ba63f2',
'b526bc0d-c4f1-49cc-b360-b32b28595916',
'27c00277-ad46-4b04-b3ed-e6ba5f22f5ab',
'872c5808-04e3-4875-974c-5b49e2a30a1f',
'28676cd0-6c2d-484f-9a36-2d1a41c81aff',
'5189abac-22ba-4f37-9204-efbcaf23afc3',
'f0eddd8d-6beb-4a98-b228-c5ace908c3bb',
'67528b88-b8c6-4464-9fdd-1e4bef82f04f',
'976ea09f-ad39-4833-b68a-0ca3da56a8a3',
'23648482-a62c-4ab1-9553-6e7972142a9b',
'a2fe7bdb-c577-4687-ae95-09e1e0f4bf8d',
'38092827-0417-4609-a05b-88bee8fa4676',
'49071375-f6ed-4cc6-a592-67d3690e0405',
'b1726023-a530-45fc-9c5c-cab488d221a8',
'ff6885c4-85e1-4599-9d58-b6864dbc79b3',
'c1576181-1ec4-40e8-8d33-a8ba7553a8e4',
'4e25501a-d5d3-480a-a59f-07cb89c892b2',
'9d9acc78-fedb-4689-ad4b-edf383e37462',
'21a6b538-d392-441d-8ad5-3db4a51c80aa',
'241492a4-4f84-4832-a4ce-7a25e2197de3',
'ddbf0ea8-3a99-4c10-9a23-6fdcb616feb3',
'8939e154-9606-47e7-b228-c8ed3d560f69',
'03d70679-ed6b-4e44-beca-8a971ea3c7c5',
'988bea1a-b51d-4fd9-a9c6-639969e94ee0',
'c6788781-cef1-4cd8-be88-a8e39f7f3551',
'fab6b222-3cee-4717-b1a6-768298bc9dcb',
'f4bc75de-0619-4727-9841-53bdcbdce3b7',
'a1ac897a-976d-4e32-8f15-cd0976300778',
'c7766ea0-8487-4df9-87cb-8603e9b450f4',
'3756d776-e598-4816-aa3b-6c4b13fa8c34',
'28cc1304-2ad1-4fe1-adba-e51fbca18400',
'2d1eb2d4-7f99-45c7-8395-4e993327a8c3',
'48621a76-1e07-4313-b336-776e521dc953',
'a9d13660-ce13-4abf-a741-7f4740aa741e',
'29e3ede3-b8c1-44c8-a02a-99ac766d8fa7',
'403e479a-901c-4f9d-ab0f-f27ec3088265',
'371bfd91-0752-4872-a65c-6f1de4801396',
'6089e8d7-e9e5-4e33-949c-be66ff6b01ff',
'd66b2213-b71d-4adb-a331-152aa61980d9',
'e241cc11-4600-4fae-b9aa-638f86077416',
'5bb96790-74ee-4a01-abbf-cf7fc5a13707',
'110e049a-e60c-4948-965e-6ee6194c2610',
'311fb922-2629-4834-82cf-23107291dbfd',
'cc276b07-7156-4204-9297-af03b707e93a',
'21cf52c8-7233-4b98-af77-7c0019b5eca3',
'ec32fbf9-3308-4759-a760-11b35d89c252',
'd9c1f375-69c5-4d5a-aa62-604ba3442a62',
'c15e84dc-1c68-478b-abd4-64af08859c7c',
'541811a9-2427-4f93-b8e3-82a6c5c159c3',
'4e109594-e2bb-4111-964b-5d072ea0e3ea',
'edcc4f80-2bb5-4ce3-b92f-c7e615e6dcea',
'42f9d3e2-e94c-4036-a308-25e951afbb84',
'541b90e6-b13f-49ac-8832-fd55a77ccead',
'2aa44f0e-e190-4c5d-8efe-cb808869dfdb',
'177aa670-3647-43e6-bf52-537905ed784e',
'4e1d7f8d-0b6e-4217-b121-20226566b659',
'0cd63ed7-30af-4a62-9f5b-fb4f28b08302',
'939e67f5-3af3-4abf-8f20-5deed49e0a9e',
'c0ae00c0-37b9-441d-820c-9485fb1e92db',
'73f108d0-7e3d-4c2d-b9e9-cb3bc92e2907',
'06d06ceb-8b61-455e-ac8e-d4f641fb21a0',
'09c00765-f9e3-4de3-80c8-69e1f95008ef',
'c4b5acff-ea65-43da-9380-e7f63523e51e',
'03092420-d130-464d-b14a-cbb29f04f4df',
'a0af55cd-638f-438f-b54e-ffeb05eb7310',
'4dbe5a17-471e-4039-912c-f5b51fda91a5',
'2d8bdd69-a54a-4730-91fe-713af2313359',
'72d3b070-7ac9-4c8a-b2d8-68999c3664d5',
'45423908-3a02-4b00-9c27-a17baa2cb323',
'36483046-bdfd-479e-a3f7-8c89b8f2fb38',
'2e605b1f-d908-44b2-a5cc-f4e42bccfa1d',
'b422465c-390b-4752-8e73-7b13da889acb',
'0ccefde3-92ce-4163-9811-a54260dab76c',
'00c78bb9-7dca-466d-a1ac-2a2927eea06b',
'2cb40911-8666-4130-86bc-7901e9bc0774',
'487ed5c3-0623-42bc-ad2c-64b1662f0584',
'7e2ca86b-7981-4aec-89b0-263bb98cc00a',
'93eeada0-8ad4-416f-8ba5-edc1343259ea',
'205824d1-94f1-4940-8d4b-27877286ebac',
'df88943a-cbb1-4f26-a522-7f10b67f53b2',
'721cb483-f188-4e61-8832-341d912b2d2c',
'79b37bf8-ebab-42da-9227-e040547081b5',
'7411c4f4-188f-42d3-892d-4280eca6e283',
'172b7279-b9c0-4946-8536-da3c4de08e94',
'a07bf429-d1ec-4cdf-9d77-072cf9dd1d1c',
'ae3df9b8-996d-4551-9cd3-9392dfe4ddc4',
'e009fc62-1617-4ac8-a8c0-2799d9bb3c1a',
'18578919-c039-4559-8987-cadc350a249f',
'5f84fa08-664e-4f57-9a10-e3c812aee65a',
'57a5c8e1-4bbe-4399-8873-60f2d66dad79',
'9a399693-1bfb-4a98-bc1f-f920b83170b8',
'ec87abe1-e617-4e9a-a9ad-b18614e22077',
'16e815d1-28f8-44f4-a53a-d77db3d303d3',
'1b802ac4-5980-4caa-9a43-9fa012f6bdc1',
'885bae0f-f98e-4e3a-99e6-45d5065964e8',
'd7f76857-7813-4fca-9c1a-f97e2867be41',
'93e1904c-61c0-475e-9acf-2da2d5df61bc',
'b2659062-a752-4d84-8843-b6bea201ec9f',
'e6351c65-9c17-4f30-b10c-1b7d9fabfc1c',
'8b51cce5-ffc2-4b8c-a3be-bdd22b90626b',
'c9d86d65-6618-4b3d-bf55-2db50ee33fc9',
'6c0ed694-1a84-40fd-97db-f3f54cbb7f72',
'a229b958-b102-4e5f-b93d-cddebfe3d83e',
'70e5d19b-d670-4f10-8186-acc8b7331ce4',
'4c23fae9-6fc6-4662-8927-bbc6f6124b75',
'c8a84ad8-8c44-4662-9a7c-6d1db416f0e1',
'c4ed333e-d266-4463-a7cc-9494376f8109',
'25069b0c-608f-41d2-92a7-51abb3f03199',
'c739aa53-d474-4ae5-85b2-2134167b72bd',
'1d0ad7c2-98bb-42fa-849e-8fea38ee65c5',
'7f4dd1aa-c648-47b0-a0c3-af830cfade7c',
'8fd48274-d8be-4643-a535-56f1f70cd5e2',
'b2f6fa8b-b17e-4b48-b96c-583babd5edc8',
'48fe9cc1-2376-49e3-bbf1-7b09236eb74d'
])) and insert_ts<=%refTs% AND loc_uuid=ANY(ARRAY['469c1cb2-334e-4cdc-897d-5220b23282c8',
'32715c84-b9dc-4661-ae3d-85d6557ba7ea',
'eb1b9f3e-d5cf-4eba-a4bc-d057ab171b67',
'553e95b8-af78-4bcb-9fec-cb5d5e8421df',
'55579e9d-4e09-46b1-8a10-3fb92582d408',
'f1c2490e-7182-4e39-9ff1-acb8d42c2ecc',
'87587313-3059-4953-bd3a-89783abdaffc',
'd6c65255-56fb-4d9f-889a-d7a4277f19bf',
'35870352-d8c3-45df-80aa-1647457cd4ca',
'11b8dae7-cdb9-4961-a272-91193bda5f98',
'00375a93-b73f-4ff7-a661-afb6a2fd9da8',
'f58772d8-b51f-46cc-bcba-4f57b883ae1b',
'99f5ab05-3e64-4fa5-8ccb-8bdd42f2c196',
'71bbccbf-ef7a-4424-ac21-40a6ff76c90f',
'b0e8ccb1-07dc-41e0-92d1-3cfbb0563a12',
'e33138d6-6e33-4cac-b61a-4ce958ba100b',
'50e27812-a44c-42b8-9812-349c59874e3f',
'a048d767-fe1e-4c10-b4f0-917c273b208f',
'092d1f83-c220-4a67-8f7a-218929e186e3',
'9983e171-d055-4307-ba5f-959bb2c2abc5',
'a5aa53b1-fcf9-4f78-9424-60720af3c2c5',
'bb131a23-ddf6-41d4-a7a4-0d3251957d95',
'6b47242e-c6ef-4b74-b25a-52be4a117df6',
'696abc4f-69b3-46f4-9a8b-4d4de1c2b592',
'ab2c80cf-8878-420e-a5df-4b698db49083',
'9eb1b927-e6c9-4608-8c4c-9d95625fa4a6',
'4ac8c83a-6a95-4726-9066-1852199ce355',
'd46e17a4-f4d1-4ceb-82fe-f56a179a9c76',
'adefc580-5ce7-4a01-bda3-7458a16f6775',
'da87947e-5d34-46ff-9a27-899a5f684807',
'717c39d8-05bf-435c-ad5e-2fd031397817',
'e60d8ec0-fcdb-4ff9-aa68-b4a10ea9d1ac',
'27b7b459-7be9-49ce-bf7e-f1b3b6149e43',
'ffc4b6b6-b410-4bb3-aeb8-0927da8a94a6',
'c0c8e0ce-bdea-4a8a-b817-46b1b3530909',
'09c2b790-796e-485b-8301-03359d01ed96',
'3ea4476f-0412-4216-86f3-b9b550f14511',
'e5198fe4-0844-4bb2-863f-440da97ebd04',
'b949d7b0-749e-4cd4-9fe3-5664e11c97d3',
'86ca927a-a7dd-424a-856b-691d89ebcb4c',
'0321aa82-5f1f-4e4f-8f81-e93baa162011',
'75a80ba9-e885-4f6d-9c61-a6b7ea635094',
'13d06c42-ddf0-4289-8530-9890a8a790d2',
'13ffe813-94da-4d66-86c1-f9b09cc688d5',
'877dd09a-8d31-4d12-984d-11c8330597a6',
'd79d3f2a-5d9e-4bc7-b20e-b0fe53ba63f2',
'b526bc0d-c4f1-49cc-b360-b32b28595916',
'27c00277-ad46-4b04-b3ed-e6ba5f22f5ab',
'872c5808-04e3-4875-974c-5b49e2a30a1f',
'28676cd0-6c2d-484f-9a36-2d1a41c81aff',
'5189abac-22ba-4f37-9204-efbcaf23afc3',
'f0eddd8d-6beb-4a98-b228-c5ace908c3bb',
'67528b88-b8c6-4464-9fdd-1e4bef82f04f',
'976ea09f-ad39-4833-b68a-0ca3da56a8a3',
'23648482-a62c-4ab1-9553-6e7972142a9b',
'a2fe7bdb-c577-4687-ae95-09e1e0f4bf8d',
'38092827-0417-4609-a05b-88bee8fa4676',
'49071375-f6ed-4cc6-a592-67d3690e0405',
'b1726023-a530-45fc-9c5c-cab488d221a8',
'ff6885c4-85e1-4599-9d58-b6864dbc79b3',
'c1576181-1ec4-40e8-8d33-a8ba7553a8e4',
'4e25501a-d5d3-480a-a59f-07cb89c892b2',
'9d9acc78-fedb-4689-ad4b-edf383e37462',
'21a6b538-d392-441d-8ad5-3db4a51c80aa',
'241492a4-4f84-4832-a4ce-7a25e2197de3',
'ddbf0ea8-3a99-4c10-9a23-6fdcb616feb3',
'8939e154-9606-47e7-b228-c8ed3d560f69',
'03d70679-ed6b-4e44-beca-8a971ea3c7c5',
'988bea1a-b51d-4fd9-a9c6-639969e94ee0',
'c6788781-cef1-4cd8-be88-a8e39f7f3551',
'fab6b222-3cee-4717-b1a6-768298bc9dcb',
'f4bc75de-0619-4727-9841-53bdcbdce3b7',
'a1ac897a-976d-4e32-8f15-cd0976300778',
'c7766ea0-8487-4df9-87cb-8603e9b450f4',
'3756d776-e598-4816-aa3b-6c4b13fa8c34',
'28cc1304-2ad1-4fe1-adba-e51fbca18400',
'2d1eb2d4-7f99-45c7-8395-4e993327a8c3',
'48621a76-1e07-4313-b336-776e521dc953',
'a9d13660-ce13-4abf-a741-7f4740aa741e',
'29e3ede3-b8c1-44c8-a02a-99ac766d8fa7',
'403e479a-901c-4f9d-ab0f-f27ec3088265',
'371bfd91-0752-4872-a65c-6f1de4801396',
'6089e8d7-e9e5-4e33-949c-be66ff6b01ff',
'd66b2213-b71d-4adb-a331-152aa61980d9',
'e241cc11-4600-4fae-b9aa-638f86077416',
'5bb96790-74ee-4a01-abbf-cf7fc5a13707',
'110e049a-e60c-4948-965e-6ee6194c2610',
'311fb922-2629-4834-82cf-23107291dbfd',
'cc276b07-7156-4204-9297-af03b707e93a',
'21cf52c8-7233-4b98-af77-7c0019b5eca3',
'ec32fbf9-3308-4759-a760-11b35d89c252',
'd9c1f375-69c5-4d5a-aa62-604ba3442a62',
'c15e84dc-1c68-478b-abd4-64af08859c7c',
'541811a9-2427-4f93-b8e3-82a6c5c159c3',
'4e109594-e2bb-4111-964b-5d072ea0e3ea',
'edcc4f80-2bb5-4ce3-b92f-c7e615e6dcea',
'42f9d3e2-e94c-4036-a308-25e951afbb84',
'541b90e6-b13f-49ac-8832-fd55a77ccead',
'2aa44f0e-e190-4c5d-8efe-cb808869dfdb',
'177aa670-3647-43e6-bf52-537905ed784e',
'4e1d7f8d-0b6e-4217-b121-20226566b659',
'0cd63ed7-30af-4a62-9f5b-fb4f28b08302',
'939e67f5-3af3-4abf-8f20-5deed49e0a9e',
'c0ae00c0-37b9-441d-820c-9485fb1e92db',
'73f108d0-7e3d-4c2d-b9e9-cb3bc92e2907',
'06d06ceb-8b61-455e-ac8e-d4f641fb21a0',
'09c00765-f9e3-4de3-80c8-69e1f95008ef',
'c4b5acff-ea65-43da-9380-e7f63523e51e',
'03092420-d130-464d-b14a-cbb29f04f4df',
'a0af55cd-638f-438f-b54e-ffeb05eb7310',
'4dbe5a17-471e-4039-912c-f5b51fda91a5',
'2d8bdd69-a54a-4730-91fe-713af2313359',
'72d3b070-7ac9-4c8a-b2d8-68999c3664d5',
'45423908-3a02-4b00-9c27-a17baa2cb323',
'36483046-bdfd-479e-a3f7-8c89b8f2fb38',
'2e605b1f-d908-44b2-a5cc-f4e42bccfa1d',
'b422465c-390b-4752-8e73-7b13da889acb',
'0ccefde3-92ce-4163-9811-a54260dab76c',
'00c78bb9-7dca-466d-a1ac-2a2927eea06b',
'2cb40911-8666-4130-86bc-7901e9bc0774',
'487ed5c3-0623-42bc-ad2c-64b1662f0584',
'7e2ca86b-7981-4aec-89b0-263bb98cc00a',
'93eeada0-8ad4-416f-8ba5-edc1343259ea',
'205824d1-94f1-4940-8d4b-27877286ebac',
'df88943a-cbb1-4f26-a522-7f10b67f53b2',
'721cb483-f188-4e61-8832-341d912b2d2c',
'79b37bf8-ebab-42da-9227-e040547081b5',
'7411c4f4-188f-42d3-892d-4280eca6e283',
'172b7279-b9c0-4946-8536-da3c4de08e94',
'a07bf429-d1ec-4cdf-9d77-072cf9dd1d1c',
'ae3df9b8-996d-4551-9cd3-9392dfe4ddc4',
'e009fc62-1617-4ac8-a8c0-2799d9bb3c1a',
'18578919-c039-4559-8987-cadc350a249f',
'5f84fa08-664e-4f57-9a10-e3c812aee65a',
'57a5c8e1-4bbe-4399-8873-60f2d66dad79',
'9a399693-1bfb-4a98-bc1f-f920b83170b8',
'ec87abe1-e617-4e9a-a9ad-b18614e22077',
'16e815d1-28f8-44f4-a53a-d77db3d303d3',
'1b802ac4-5980-4caa-9a43-9fa012f6bdc1',
'885bae0f-f98e-4e3a-99e6-45d5065964e8',
'd7f76857-7813-4fca-9c1a-f97e2867be41',
'93e1904c-61c0-475e-9acf-2da2d5df61bc',
'b2659062-a752-4d84-8843-b6bea201ec9f',
'e6351c65-9c17-4f30-b10c-1b7d9fabfc1c',
'8b51cce5-ffc2-4b8c-a3be-bdd22b90626b',
'c9d86d65-6618-4b3d-bf55-2db50ee33fc9',
'6c0ed694-1a84-40fd-97db-f3f54cbb7f72',
'a229b958-b102-4e5f-b93d-cddebfe3d83e',
'70e5d19b-d670-4f10-8186-acc8b7331ce4',
'4c23fae9-6fc6-4662-8927-bbc6f6124b75',
'c8a84ad8-8c44-4662-9a7c-6d1db416f0e1',
'c4ed333e-d266-4463-a7cc-9494376f8109',
'25069b0c-608f-41d2-92a7-51abb3f03199',
'c739aa53-d474-4ae5-85b2-2134167b72bd',
'1d0ad7c2-98bb-42fa-849e-8fea38ee65c5',
'7f4dd1aa-c648-47b0-a0c3-af830cfade7c',
'8fd48274-d8be-4643-a535-56f1f70cd5e2',
'b2f6fa8b-b17e-4b48-b96c-583babd5edc8',
'48fe9cc1-2376-49e3-bbf1-7b09236eb74d'
])
Leave a Comment