F
Size: a a a
F
IS
MN
А
А
К
select * from notifications
where
object_type = $1
and object_id in (
select
o.id
from
orders o
where
o.order_id = $2
and not exists (
select
$4
from
users u
join order_phones op on
op.phone_number = u.phone
where
u.id = n.user_id
and op.order_id = o.order_id
and op.phone_kind = $5))
and is_deleted = $6
вот этот not exists он же никак не коррелирован со внешним, какой от него толк?К
select * from notifications
where
object_type = $1
and object_id in (
select
o.id
from
orders o
where
o.order_id = $2
and not exists (
select
$4
from
users u
join order_phones op on
op.phone_number = u.phone
where
u.id = n.user_id
and op.order_id = o.order_id
and op.phone_kind = $5))
and is_deleted = $6
вот этот not exists он же никак не коррелирован со внешним, какой от него толк?К
L
IS
К
L
IS
IS
L
К