Hi, Sergei
Thanks! I've just double checked and they are the same:
\d notice
id | bigint | | not null |
nextval('notice_id_seq'::regclass)
mbct_id| bigint | | |
\d news
id | bigint
Hi
Please check datatypes in union all part. Possible, notice.id or notice.mbct_id
datatypes does not match with other tables.
regards, Sergei
Hi,
I am joining the union of three tables with another table. Postgresql uses
the index when only two tables are in the union. If I add one more table to
the union, it switches to seq scan. Apparently it also uses the index when
only one table is joined.
The SQL is:
select * from (
SELECT 'NEWS'