Search Postgresql Archives

Efficiency of inner joins across multiple tables

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,
I guess this is basic question for DBAs. I have several tables, each numbering in 100,000's of rows. They all have have connectionHash as the primary key and indices on several variables.
E.g
Table1 has connectionHash, duration, type
Table2 has connectionHash, location
Table3 has connectionHash, region


Now i need to select columns:connectionHash, duration, location, region (the variables can differ)
from Tables 1,2 and 3 using an inner join on connectionHash(indexed).

Q: How efficient is this?

Issues involved:
One might suggest that i make a table with all columns from across all tables, however, as my research continues
more tables, TableK, with connectionHash, extracolumn will be created.
Option:
Every time i create a new table should i create a table with all columns and query from that? So I make one new table (made via an inner join, but done only once) and subsequent queries made from this larger table(union of all columns from Tables 1..K)

Any suggestions will be very much welcome.
Regards
Saptarshi





[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux