Substitute for synonym in Oracle after migration to postgres

Поиск
Список
Период
Сортировка
Искать

Substitute for synonym in Oracle after migration to postgres

От:
aditya desai <admad123@gmail.com>
Дата:
Hi,
We have to access data from one schema to another. We have created a view for this but performance is not good. We tried materialized views as well but Refresh MV is creating problem as it puts and access exclusive locks.

Is there any other way to achieve this?


Regards,
Aditya.

Re: Substitute for synonym in Oracle after migration to postgres

От:
Laurenz Albe <laurenz.albe@cybertec.at>
Дата:
On Tue, 2021-04-06 at 13:22 +0530, aditya desai wrote:
> We have to access data from one schema to another. We have created
>  a view for this but performance is not good.

The performance of a view that is just a simple SELECT to a table
in a different schema will be just as good as using that table
directly.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com



Re: Substitute for synonym in Oracle after migration to postgres

От:
hubert depesz lubaczewski <depesz@depesz.com>
Дата:
On Tue, Apr 06, 2021 at 01:22:31PM +0530, aditya desai wrote:
> Hi,
> We have to access data from one schema to another. We have created a view for this but performance is not good. We tried
> materialized views as well but Refresh MV is creating problem as it puts and access exclusive locks.
> Is there any other way to achieve this?

Yes, just use the other table right in your query. There is no need to
add wrappers.

select * from schema1.table join schema2.table on ...

depesz


Re: Substitute for synonym in Oracle after migration to postgres

От:
aditya desai <admad123@gmail.com>
Дата:
Thanks will check.

On Tue, Apr 6, 2021 at 4:11 PM hubert depesz lubaczewski <depesz@depesz.com> wrote:
On Tue, Apr 06, 2021 at 01:22:31PM +0530, aditya desai wrote:
> Hi,
> We have to access data from one schema to another. We have created a view for this but performance is not good. We tried
> materialized views as well but Refresh MV is creating problem as it puts and access exclusive locks.
> Is there any other way to achieve this?

Yes, just use the other table right in your query. There is no need to
add wrappers.

select * from schema1.table join schema2.table on ...

depesz
FAQ