Re: Is replacing transactions with CTE a good idea?
| От | Dave Cramer |
|---|---|
| Тема | Re: Is replacing transactions with CTE a good idea? |
| Дата | |
| Msg-id | CADK3HHJ5m_dJsSsW8sLK+M9RfVWV0x42o0r8E4H1O4PtmBemiQ@mail.gmail.com обсуждение исходный текст |
| Ответ на | Re: Is replacing transactions with CTE a good idea? (Glen Huang <heyhgl@gmail.com>) |
| Ответы |
Re: Is replacing transactions with CTE a good idea?
Re: Is replacing transactions with CTE a good idea? |
| Список | pgsql-general |
CTE's don't change the isolation level. I'm not sure what you are getting at here ?
Dave Cramer
www.postgres.rocks
On Thu, 1 Apr 2021 at 11:20, Glen Huang <heyhgl@gmail.com> wrote:
Sorry, my mistake. I misunderstood serializable. Are queries in a CTE equivalent to those in a repeatable read transaction?On Apr 1, 2021, at 11:10 PM, Dave Cramer <davecramer@postgres.rocks> wrote:On Thu, 1 Apr 2021 at 11:09, Glen Huang <heyhgl@gmail.com> wrote:No, but are they equivalent to serializable transactions?No, they are not.Dave Cramerwww.postgres.rocksOn Apr 1, 2021, at 11:04 PM, Dave Cramer <davecramer@postgres.rocks> wrote:On Thu, 1 Apr 2021 at 10:50, Glen Huang <heyhgl@gmail.com> wrote:Hi all,
From application’s standpoint, it seems using CTE saves a lot work. You no longer need to parse values out only to pass them back in, and only one round-trip to the db server.
If I’m not wrong, CTE is equivalent to serializable transactions? So I guess the downsize is that quarries can’t be run in parallel?I do not think a CTE changes the isolation level.
If I decide to replace all my transaction code with CTE, will I shoot myself in the foot down the road?Dave Cramerwww.postgres.rocks
В списке pgsql-general по дате отправления: