Re: [PERFORM] Optimization

2003-07-28 Thread Shridhar Daithankar
On 28 Jul 2003 at 12:27, Josh Berkus wrote: > Unless you're running PostgreSQL 7.1 or earlier, you should be VACUUMing every > 10-15 minutes, not every 2-3 hours. Regular VACUUM does not lock your > database. You will also want to increase your FSM_relations so that VACUUM > is more effective

[PERFORM] Why performance improvement on converting subselect to a function ?

2003-07-28 Thread Rajesh Kumar Mallah
Hi, For each company_id in certain table i have to search the same table get certain rows sort them and pick up the top one , i tried using this subselect: explain analyze SELECT company_id , (SELECT edition FROM ONLY public.branding_master b WHERE old_company_id = a.company_id OR company_id =

Re: [PERFORM] [ADMIN] Rebuild indexes

2003-07-28 Thread Shankar K
thanks tom. i wasn't sure about create index taking exclusive locks on tables too. so i could as well reindex than doing the whole _swap mess during off-peak hrs. --- Tom Lane <[EMAIL PROTECTED]> wrote: > Shankar K <[EMAIL PROTECTED]> writes: > > ... so i then decided to do reindex online, but >

Re: [PERFORM] [ADMIN] Rebuild indexes

2003-07-28 Thread Tom Lane
Shankar K <[EMAIL PROTECTED]> writes: > ... so i then decided to do reindex online, but > that makes exclusive lock on table which would prevent > writing on to tables. So does CREATE INDEX, so it's not clear what you're buying with all these pushups. > 2. analyze table to update stats, so that t

Re: [PERFORM] Rebuild indexes

2003-07-28 Thread Josh Berkus
Shankar, > Is there a better way to do this. comments are > appreciated. No. This is one of the major features in 7.4; FSM and VACUUM will manage indexes as well. Until then, we all suffer BTW, the REINDEX command is transaction-safe. So if your database has "lull" periods, you can r

[PERFORM] Rebuild indexes

2003-07-28 Thread Shankar K
Hi Everyone, I've a kind of less inserts/mostly updates table, which we vacuum every half-hour. here is the output of vacuum analyze INFO: --Relation public.accounts-- INFO: Index accounts_u1: Pages 1498; Tuples 515: Deleted 179. CPU 0.00s/0.00u sec elapsed 0.00 sec. INFO: Index acc

Re: [PERFORM] Optimization

2003-07-28 Thread Josh Berkus
Justin, > I am trying to understand the various factors used by Postgres to optimize. I presently have a dual-866 Dell server with 1GB of memory. I've done the following: see: http://www.varlena.com/varlena/GeneralBits/Tidbits/index.php which has articles on .conf files. (feel free to link thes

Re: [PERFORM] Mapping a database completly into Memory

2003-07-28 Thread Tom Lane
Josh Berkus <[EMAIL PROTECTED]> writes: >> If we had a portable way >> of preventing the kernel from caching the same page, it would make more >> sense to run with large shared_buffers. > Really? I thought we wanted to move the other way ... that is, if we could > get over the portability issues

Re: [PERFORM] Tuning PostgreSQL

2003-07-28 Thread Josh Berkus
Balasz, > Since there seem to be a lot of different opinions regarding the various > different RAID configurations I thought I'd post this link to the list: > http://www.storagereview.com/guide2000/ref/hdd/perf/raid/index.html Yeah ... this is a really good article. Made me realize why "stripey

Re: [PERFORM] Mapping a database completly into Memory

2003-07-28 Thread Franco Bruno Borghesi
But I think it's still a good option. For example, in servers where there are other applications running (a web server, for example) that are constantly accesing the disk and replacing cached postgresql pages in the kernel, having shared buffers could reduce this efect and assure the precense

Re: [PERFORM] Optimization

2003-07-28 Thread Josh Berkus
Justin, > I am trying to understand the various factors used by Postgres to optimize. I presently have a dual-866 Dell server with 1GB of memory. I've done the following: Please set the performance articles at: http://www.varlena.com/varlena/GeneralBits/Tidbits/index.php -- -Josh Berkus Agl

Re: [PERFORM] Mapping Database completly into memory

2003-07-28 Thread scott.marlowe
On Sun, 27 Jul 2003, Daniel Migowski wrote: > Hallo pgsql-performance, > > I just wondered if there is a possibility to map my database running > on a linux system completly into memory and to only use disk > accesses for writes. > > I got a nice machine around with 2 gigs of ram, and my databas

Re: [PERFORM] Mapping a database completly into Memory

2003-07-28 Thread Andrew Sullivan
On Mon, Jul 28, 2003 at 12:25:57PM -0400, Tom Lane wrote: > in the kernel's disk cache), thus wasting RAM. If we had a portable way > of preventing the kernel from caching the same page, it would make more > sense to run with large shared_buffers. Plus, Postgres seems not to be very good at manag

Re: [PERFORM] Optimization

2003-07-28 Thread Nick Fankhauser
>Can someone tell me what effective_cache_size should be set to? You may be able to intuit this from my last post, but if I understand correctly, what you should be doing is estimating how much memory is likely to be "left over" for the OS to do disk caching with after all of the basic needs of

Re: [PERFORM] Optimization

2003-07-28 Thread Nick Fankhauser - Doxpop
Justin- It sounds like you're on a system similar to ours, so I'll pass along the changes that I made, which seem to have increased performance, and most importantly, haven't hurt anything. The main difference in our environment is that we are less Update/Insert intensive than you are- in our appl

Re: [PERFORM] Optimization

2003-07-28 Thread Nick Fankhauser
Justin- It sounds like you're on a system similar to ours, so I'll pass along the changes that I made, which seem to have increased performance, and most importantly, haven't hurt anything. The main difference in our environment is that we are less Update/Insert intensive than you are- in our appl

[PERFORM] Optimization

2003-07-28 Thread Justin Long
Greetings,   I am trying to understand the various factors used by Postgres to optimize. I presently have a dual-866 Dell server with 1GB of memory. I've done the following:   set /proc/sys/kernel/shmmax to 51200 shared_buffers = 32000sort_mem = 32000max_connections=64fsync=false Can som

Re: [PERFORM] Mapping a database completly into Memory

2003-07-28 Thread Tom Lane
Franco Bruno Borghesi <[EMAIL PROTECTED]> writes: > wouldn't also increasing shared_buffers to 64 or 128 MB be a good > performance improvement? This way, pages belonging to heavily used > indexes would be already cached by the database itself. Not necessarily. The trouble with large shared_buffe

Re: [PERFORM] Mapping a database completly into Memory

2003-07-28 Thread Josh Berkus
Tom, > If we had a portable way > of preventing the kernel from caching the same page, it would make more > sense to run with large shared_buffers. Really? I thought we wanted to move the other way ... that is, if we could get over the portability issues, eliminate shared_buffers entirely and r

Re: [PERFORM] Mapping a database completly into Memory

2003-07-28 Thread Franco Bruno Borghesi
wouldn't also increasing shared_buffers to 64 or 128 MB be a good performance improvement? This way, pages belonging to heavily used indexes would be already cached by the database itself. Please, correct me if I'm wrong. On Mon, 2003-07-28 at 01:14, Josh Berkus wrote: Daniel, > > I just wo