Re: Append table
От
Gregory Stark
Тема
Re: Append table
Дата
Msg-id
87d50e5n5n.fsf@oxford.xeocode.com
Ответ на
Re: Append table (Arjen van der Meijden)
Список
Дерево обсуждения
Re: Append table "Hanu Kurubar" <hanu.kurubar@gmail.com>
Re: Append table "Hanu Kurubar" <hanu.kurubar@gmail.com>
Re: Append table Arjen van der Meijden <acmmailing@tweakers.net>
Re: Append table Chander Ganesan <chander@otg-nc.com>
Re: Append table Gregory Stark <stark@enterprisedb.com>
Re: Append table "Hanu Kurubar" <hanu.kurubar@gmail.com>
"Arjen van der Meijden" writes: > There are two solutions: ... > Or you can visually combine them without actually putting the records in a > single table. That can be with a normal select-union statement or with a view, > something like this: > SELECT EmpId, EmpName FROM tabelA UNION EmpID, EmpName FROM tabelB; If you're sure the two sets are distinct or you want to get any duplicates and not eliminate them then if you went with this option you would want to use "UNION ALL" not just a plain union. In SQL UNION has to remove duplicates which often involves gathering all the records and performing a big sort and lots of extra work. UNION ALL is much faster and can start returning records right away. -- Gregory Stark EnterpriseDB http://www.enterprisedb.com
В списке pgsql-performance по дате отправления