РА
Size: a a a
РА
YS
L
YS
L
YS
L
L
L
L
+------------------------------------------------------------------------------------------------------------+
|QUERY PLAN |
+------------------------------------------------------------------------------------------------------------+
|Update on t1 d (cost=45.09..67.30 rows=3 width=75) (actual time=0.009..0.009 rows=0 loops=1) |
| -> Hash Join (cost=45.09..67.30 rows=3 width=75) (actual time=0.008..0.008 rows=0 loops=1) |
| Hash Cond: ((d.domain)::text = (x.domain)::text) |
| -> Seq Scan on t1 d (cost=0.00..19.75 rows=650 width=23) (actual time=0.008..0.008 rows=0 loops=1)|
| Filter: ((tld_id = 1) AND ((letter)::text = '0'::text)) |
| -> Hash (cost=45.05..45.05 rows=3 width=23) (never executed) |
| -> Hash Right Join (cost=26.25..45.05 rows=3 width=23) (never executed) |
| Hash Cond: ((y.domain)::text = (x.domain)::text) |
| Filter: (y.* IS NOT DISTINCT FROM NULL) |
| -> Seq Scan on t2 y (cost=0.00..13.70 rows=370 width=378) (never executed) |
| -> Hash (cost=18.12..18.12 rows=650 width=17) (never executed) |
| -> Seq Scan on t1 x (cost=0.00..18.12 rows=650 width=17) (never executed) |
| Filter: ((deleted_at IS NULL) AND (tld_id = 1)) |
|Settings: search_path = 'public' |
|Planning Time: 1.184 ms |
|Execution Time: 4.172 ms |
+------------------------------------------------------------------------------------------------------------+L
EXPLAIN (ANALYZE, BUFFERS, SETTINGS)
UPDATE
t1 D
SET
name_servers = '{}',
updated_at = null,
deleted_at = '2020-08-22'
FROM
t1 X
LEFT JOIN
t2 Y
USING (domain)
WHERE
D.tld_id = 1 AND
D.letter = '0' AND
D.domain = X.domain AND
D.tld_id = X.tld_id AND
X.deleted_at is null AND
Y IS NOT DISTINCT FROM NULL; -- "антиджойн"L
L
AI
2_
AI
AI
AI
2_
AI