Subject | The difference in queries |
---|---|
Author | Łukasz Bączek |
Post date | 2014-03-09T20:33:13Z |
Hi,
Inquiries made at isolation level SERIALIZABLE are automatically blocked
So, for example, by performing a SQL query :
"SELECT * FROM (SELECT sesje.id_sesje , sesje.numer , sesje.data ,
sesje.rozpatrzona , osoby.imie | | ' ' | | osoby.nazwisko chairman AS
FROM LEFT JOIN sessions sesje_eksperci ON sesje.id_sesje =
sesje_eksperci.id_sesje AND sesje_eksperci.przewodniczacy = 1 LEFT JOIN
person ON osoby.id_osoby = sesje_eksperci.id_osoby sesje.data ORDER BY
ASC) WHERE sessions id_sesje = 12 "
I have done automatically blockade record , right?
So what will be different query:
"SELECT * FROM (SELECT sesje.id_sesje , sesje.numer , sesje.data ,
sesje.rozpatrzona , osoby.imie | | ' ' | | osoby.nazwisko chairman AS
FROM LEFT JOIN sessions sesje_eksperci ON sesje.id_sesje =
sesje_eksperci.id_sesje AND sesje_eksperci.przewodniczacy = 1 LEFT JOIN
person ON osoby.id_osoby = sesje_eksperci.id_osoby sesje.data ORDER BY
ASC) WHERE sessions id_sesje = 12 FOR UPDATE WITH LOCK "
because both query blocks record .
Regards
Inquiries made at isolation level SERIALIZABLE are automatically blocked
So, for example, by performing a SQL query :
"SELECT * FROM (SELECT sesje.id_sesje , sesje.numer , sesje.data ,
sesje.rozpatrzona , osoby.imie | | ' ' | | osoby.nazwisko chairman AS
FROM LEFT JOIN sessions sesje_eksperci ON sesje.id_sesje =
sesje_eksperci.id_sesje AND sesje_eksperci.przewodniczacy = 1 LEFT JOIN
person ON osoby.id_osoby = sesje_eksperci.id_osoby sesje.data ORDER BY
ASC) WHERE sessions id_sesje = 12 "
I have done automatically blockade record , right?
So what will be different query:
"SELECT * FROM (SELECT sesje.id_sesje , sesje.numer , sesje.data ,
sesje.rozpatrzona , osoby.imie | | ' ' | | osoby.nazwisko chairman AS
FROM LEFT JOIN sessions sesje_eksperci ON sesje.id_sesje =
sesje_eksperci.id_sesje AND sesje_eksperci.przewodniczacy = 1 LEFT JOIN
person ON osoby.id_osoby = sesje_eksperci.id_osoby sesje.data ORDER BY
ASC) WHERE sessions id_sesje = 12 FOR UPDATE WITH LOCK "
because both query blocks record .
Regards