[PERFORM] switchover between index and sequential scans

2008-07-03 Thread Abhijit Menon-Sen
Hi. I have a table with 1.8M rows on a Postgres 8.1.4 server, and I'm executing a query which looks like: select count(*) from header_fields where message in (select message from mailbox_messages limit N); I've found that when N==75, the query uses a fast index scan, but when N==100, it

Re: [PERFORM] switchover between index and sequential scans

2008-07-03 Thread Gregory Stark
"Abhijit Menon-Sen" <[EMAIL PROTECTED]> writes: > -> Index Scan using header_fields_message_key on header_fields > (cost=0.00..1126.73 rows=325 width=4) (actual time=9.003..12.330 rows=17 > loops=75) >Index Cond: (header_fields.message = "outer".message) > > -

[PERFORM] cursor/Fetch mechanisms under postgreSQL

2008-07-03 Thread Mokhtari Amine
Hi, I have juste some questions about cursor/Fetch mechanisms under postgreSQL. Do it use only scan table approach when one fetch (next) is executed or it takes into account index when this lasts one is able to increase the performance. I did some experimentation wherein I calculated real w

Re: [PERFORM] switchover between index and sequential scans

2008-07-03 Thread Abhijit Menon-Sen
Hi Greg. At 2008-07-03 11:05:46 +0100, [EMAIL PROTECTED] wrote: > > And increase the statistics target on header_fields and re-analyze? Aha! Thanks for the tip. I just changed the default_statistics_target to 100 (from 10) and ANALYSEd header_fields and mailbox_messages, and now it ALWAYS uses th

Re: [PERFORM] [QUESTION]Concurrent Access

2008-07-03 Thread PFC
I want to know if the PostGree has limitations about the concurrent access, because a lot of people will access this database at the same time. PostgreSQL has excellent concurrency provided you use it correctly. But what do you mean by concurrent access ? * Number o

[PERFORM] slow delete

2008-07-03 Thread Jessica Richard
I have a table with 29K rows total and I need to delete about 80K out of it. I have a b-tree index on column cola (varchar(255) ) for my where clause to use. my "select count(*) from test where cola = 'abc' runs very fast, but my actual "delete from test where cola = 'abc';" takes forever, neve

[PERFORM] Define all IP's in the world in pg_hba.conf

2008-07-03 Thread idc danny
Hi everybody, I know that this group deals with performance but is the only one on which I'm subscribed, so my apologize in advance for the question. I want to allow everybody in the world, all IP's, to connect to my server. How do I accomplish that? Definitely, it's not a good solution to ente

Re: [PERFORM] slow delete

2008-07-03 Thread Craig Ringer
Jessica Richard wrote: I have a table with 29K rows total and I need to delete about 80K out of it. I assume you meant 290K or something. I have a b-tree index on column cola (varchar(255) ) for my where clause to use. my "select count(*) from test where cola = 'abc' runs very fast, but m

Re: [PERFORM] Define all IP's in the world in pg_hba.conf

2008-07-03 Thread Russell Smith
idc danny wrote: > Hi everybody, > > I know that this group deals with performance but is the only one on which > I'm subscribed, so my apologize in advance for the question. > > I want to allow everybody in the world, all IP's, to connect to my server. > How do I accomplish that? Definitely, it'