Re: What is faster?
От | ON.KG |
---|---|
Тема | Re: What is faster? |
Дата | |
Msg-id | 52585625.20050607112826@on.kg обсуждение исходный текст |
Ответ на | Re: What is faster? (Richard Huxton <dev@archonet.com>) |
Ответы |
Re: What is faster?
|
Список | pgsql-sql |
RH> ON.KG wrote: >> Hi All! >> >>>>What is faster - SLECTion data from one large table (200 000 - 300 000 >>>>records), or SELECTion from a few small tables (example, 2 tables 150 >>>>000 records each)? >> >> For example i have two large tables >> Structure of tables is same - has two fields - id, ip >> >> Now i'm using two selection from each in one transaction >> Each of them selects only one record >> selection clase like WHERE ip = 'xxx.xxx.xxx.xxx' >> so it is searches existance of IP in each table >> >> tables are clustered RH> OK - so the tables aren't updated frequently, I assume. Do you have an RH> index on "ip"? Yes >> about cached in RAM - i'm novice in Postgresql - how does it work? RH> The operating-system will keep frequently used disk-blocks in memory. RH> You don't have to do anything. Have you done any performance tuning in RH> your postgresql.conf file? If not, try reading: RH> http://www.powerpostgresql.com/PerfList Server Administrator says, he did >> now i need to make much faster as it is possible >> and have an idea just merge two tables in one - will it help me? RH> If they hold the same information, they probably shouldn't have been RH> split in the first place. Content of tables is not absolutely same One has one kind of IPs, second - others And there's one more addition in question - if I will merge tables, in new table will be set new additional field - `type` char - to determine type of IP Thank You
В списке pgsql-sql по дате отправления: