Re: [PERFORM] Two hard drives --- what to do with them?

2007-02-26 Thread Shane Ambler
Jeff Davis wrote: Sorry for for not being familar with storage techonologies... Does "battery" here mean battery in the common sense of the word - some kind of independent power supply? Shouldn't the disk itself be backed by a battery? As should the entire storage subsystem? Yes, a battery th

Re: [PERFORM] Two hard drives --- what to do with them?

2007-02-26 Thread Jeff Davis
On Tue, 2007-02-27 at 01:11 +0100, Peter Kovacs wrote: > On 2/26/07, Jeff Davis <[EMAIL PROTECTED]> wrote: > > On Sun, 2007-02-25 at 23:11 +0100, Peter Kovacs wrote: > > > A related question: > > > Is it sufficient to disable write cache only on the disk where pg_xlog > > > is located? Or should wr

Re: [PERFORM] Two hard drives --- what to do with them?

2007-02-26 Thread Peter Kovacs
On 2/26/07, Jeff Davis <[EMAIL PROTECTED]> wrote: On Sun, 2007-02-25 at 23:11 +0100, Peter Kovacs wrote: > A related question: > Is it sufficient to disable write cache only on the disk where pg_xlog > is located? Or should write cache be disabled on both disks? > When PostgreSQL does a checkpoi

Re: [PERFORM] Two hard drives --- what to do with them?

2007-02-26 Thread Jeff Davis
On Sun, 2007-02-25 at 23:11 +0100, Peter Kovacs wrote: > A related question: > Is it sufficient to disable write cache only on the disk where pg_xlog > is located? Or should write cache be disabled on both disks? > When PostgreSQL does a checkpoint, it thinks the data pages before the checkpoint

Re: [PERFORM] Writting a "search engine" for a pgsql DB

2007-02-26 Thread Charles Sprickman
On Mon, 26 Feb 2007, Madison Kelly wrote: Hi all, I'd really like to come up with a more intelligent search engine that doesn't take two minutes to return results. :) I know, in the end good indexes and underlying hardware will be important, but a sane as possible query structure helps to st

Re: [PERFORM] Vacuumdb - Max_FSM_Pages Problem.

2007-02-26 Thread Ron
At 10:53 AM 2/26/2007, Peter Childs wrote: On 26/02/07, Pallav Kalva <[EMAIL PROTECTED]> wrote: Hi, I am in the process of cleaning up one of our big table, this table has 187 million records and we need to delete around 100 million of them. I am deleting around 4-5 million of them d

Re: [PERFORM] Writting a "search engine" for a pgsql DB

2007-02-26 Thread Jeff Davis
On Mon, 2007-02-26 at 11:29 -0500, Madison Kelly wrote: >I am looking at writing a search engine of sorts for my database. I > have only ever written very simple search engines before which amounted > to not much more that the query string being used with ILIKE on a pile > of columns. This w

Re: [PERFORM] Writting a "search engine" for a pgsql DB

2007-02-26 Thread Mark Stosberg
> > Now see, this is exactly the kind of sagely advice I was hoping for! :) > > I'll look into tsearch2, and failing that for some reason, I love the > keyword table idea. For example keyword search code, you can try this package: http://downloads.sourceforge.net/cascade/cascade-devel-pieces-1.1

Re: [PERFORM] Writting a "search engine" for a pgsql DB

2007-02-26 Thread Madison Kelly
Mark Stosberg wrote: Madison Kelly wrote: I think the more direct question I was trying to get at is "How do you build a 'relavence' search engine? One where results are returned/sorted by relevance of some sort?". At this point, the best I can think of, would be to perform multiple queries; f

Re: [PERFORM] Writting a "search engine" for a pgsql DB

2007-02-26 Thread Mark Stosberg
Madison Kelly wrote: > > I think the more direct question I was trying to get at is "How do you > build a 'relavence' search engine? One where results are returned/sorted > by relevance of some sort?". At this point, the best I can think of, > would be to perform multiple queries; first matching

Re: [PERFORM] Writting a "search engine" for a pgsql DB

2007-02-26 Thread Magnus Hagander
> Joshua, I've been digging around the CVS (web) looking for the search > engine code but so far have only found the reference (www.search) in > 'general.php' but can't locate the file. You wouldn't happen to have a > direct link would you? It's all in module "portal". You will find the indexing

Re: [PERFORM] Writting a "search engine" for a pgsql DB

2007-02-26 Thread Madison Kelly
Mark Stosberg wrote: Joshua D. Drake wrote: Madison Kelly wrote: Hi all, I am asking in this list because, at the end of the day, this is a performance question. I am looking at writing a search engine of sorts for my database. I have only ever written very simple search engines before wh

Re: [PERFORM] [JDBC] does prepareThreshold work? forced to use old driver

2007-02-26 Thread Gene
Thank you! setting the protocolVersion=2 works with the newer driver. I'm still puzzled as to why the prepareThreshold=0 doesn't force the replan though. On 2/26/07, Dave Cramer <[EMAIL PROTECTED]> wrote: On 26-Feb-07, at 11:12 AM, Gene wrote: > hi! > > I've been having some serious performanc

Re: [PERFORM] Writting a "search engine" for a pgsql DB

2007-02-26 Thread Joshua D. Drake
>>> So I am hoping some of you guys and gals might be able to point me >>> towards some resources or offer some tips or gotcha's before I get >>> started on this. I'd really like to come up with a more intelligent >>> search engine that doesn't take two minutes to return results. :) I >>> know,

Re: [PERFORM] Writting a "search engine" for a pgsql DB

2007-02-26 Thread Mark Stosberg
Joshua D. Drake wrote: > Madison Kelly wrote: >> Hi all, >> >> I am asking in this list because, at the end of the day, this is a >> performance question. >> >> I am looking at writing a search engine of sorts for my database. I >> have only ever written very simple search engines before which

Re: [PERFORM] [JDBC] does prepareThreshold work? forced to use old driver

2007-02-26 Thread Dave Cramer
On 26-Feb-07, at 11:12 AM, Gene wrote: hi! I've been having some serious performance issues with postgresql8.2/hibernate/jdbc due to postgres reusing bad cached query plans. It doesn't look at the parameter values and therefore does not use any partial indexes. After trying to set prepareThre

Re: [PERFORM] low memory usage reported by 'top' indicates poor tuning?

2007-02-26 Thread Mark Stosberg
Joshua D. Drake wrote: > Mark Stosberg wrote: >> Hello, >> >> I'm trying to make sense of the memory usage reported by 'top', compared >> to what "pg_database_size" shows. Here's one result:' > > > You are missing the most important parts of the equation: Thanks for your patience, Joshua. I'm

Re: [PERFORM] low memory usage reported by 'top' indicates poor tuning?

2007-02-26 Thread Joshua D. Drake
Mark Stosberg wrote: > Hello, > > I'm trying to make sense of the memory usage reported by 'top', compared > to what "pg_database_size" shows. Here's one result:' You are missing the most important parts of the equation: 1. What version of PostgreSQL. 2. What operating system -- scratch , I s

Re: [PERFORM] Writting a "search engine" for a pgsql DB

2007-02-26 Thread Joshua D. Drake
Madison Kelly wrote: > Hi all, > > I am asking in this list because, at the end of the day, this is a > performance question. > > I am looking at writing a search engine of sorts for my database. I > have only ever written very simple search engines before which amounted > to not much more th

[PERFORM] low memory usage reported by 'top' indicates poor tuning?

2007-02-26 Thread Mark Stosberg
Hello, I'm trying to make sense of the memory usage reported by 'top', compared to what "pg_database_size" shows. Here's one result: select pg_size_pretty(pg_database_size('production')); pg_size_pretty 6573 MB Now, looking at memory use with "top", there is a lot memory tha

Re: [PERFORM] [JDBC] does prepareThreshold work? forced to use old driver

2007-02-26 Thread Kris Jurka
On Mon, 26 Feb 2007, Gene wrote: I've been having some serious performance issues with postgresql8.2/hibernate/jdbc due to postgres reusing bad cached query plans. It doesn't look at the parameter values and therefore does not use any partial indexes. After trying to set prepareThreshold=0 in

[PERFORM] Writting a "search engine" for a pgsql DB

2007-02-26 Thread Madison Kelly
Hi all, I am asking in this list because, at the end of the day, this is a performance question. I am looking at writing a search engine of sorts for my database. I have only ever written very simple search engines before which amounted to not much more that the query string being used w

[PERFORM] does prepareThreshold work? forced to use old driver

2007-02-26 Thread Gene
hi! I've been having some serious performance issues with postgresql8.2/hibernate/jdbc due to postgres reusing bad cached query plans. It doesn't look at the parameter values and therefore does not use any partial indexes. After trying to set prepareThreshold=0 in the connection string which did

Re: [PERFORM] Vacuumdb - Max_FSM_Pages Problem.

2007-02-26 Thread Peter Childs
On 26/02/07, Pallav Kalva <[EMAIL PROTECTED]> wrote: Hi, I am in the process of cleaning up one of our big table, this table has 187 million records and we need to delete around 100 million of them. I am deleting around 4-5 million of them daily in order to catchup with vacuum and als

[PERFORM] Vacuumdb - Max_FSM_Pages Problem.

2007-02-26 Thread Pallav Kalva
Hi, I am in the process of cleaning up one of our big table, this table has 187 million records and we need to delete around 100 million of them. I am deleting around 4-5 million of them daily in order to catchup with vacuum and also with the archive logs space. So far I have deleted a

Re: [PERFORM] Server Startup Error

2007-02-26 Thread Richard Huxton
Note - try to cc: the mailing list, I don't always read this inbox Gauri Kanekar wrote: On 2/26/07, Richard Huxton wrote: Gauri Kanekar wrote: > Hi List, > > Machine was down due to some hardware problem. > > After then when i issue this command /usr/local/pgsql/bin/psql -l > its giving me t

Re: [PERFORM] Server Startup Error

2007-02-26 Thread Rodrigo Gonzalez
Gauri Kanekar wrote: Thanks, But how to start postgres server On 2/26/07, *Rodrigo Gonzalez* <[EMAIL PROTECTED] > wrote: Gauri Kanekar wrote: > Hi List, > > Machine was down due to some hardware problem. > > After then when i issue this

Re: [PERFORM] Server Startup Error

2007-02-26 Thread Richard Huxton
Gauri Kanekar wrote: Hi List, Machine was down due to some hardware problem. After then when i issue this command /usr/local/pgsql/bin/psql -l its giving me the following error psql: could not connect to server: No such file or directory Is the server running locally and accepting

Re: [PERFORM] Server Startup Error

2007-02-26 Thread Gauri Kanekar
Thanks, But how to start postgres server On 2/26/07, Rodrigo Gonzalez <[EMAIL PROTECTED]> wrote: Gauri Kanekar wrote: > Hi List, > > Machine was down due to some hardware problem. > > After then when i issue this command /usr/local/pgsql/bin/psql -l > its giving me the following error > > psql

Re: [PERFORM] Server Startup Error

2007-02-26 Thread Rodrigo Gonzalez
Gauri Kanekar wrote: Hi List, Machine was down due to some hardware problem. After then when i issue this command /usr/local/pgsql/bin/psql -l its giving me the following error psql: could not connect to server: No such file or directory Is the server running locally and accepting

[PERFORM] Server Startup Error

2007-02-26 Thread Gauri Kanekar
Hi List, Machine was down due to some hardware problem. After then when i issue this command /usr/local/pgsql/bin/psql -l its giving me the following error psql: could not connect to server: No such file or directory Is the server running locally and accepting connections on Unix

Re: [PERFORM] pg_trgm performance

2007-02-26 Thread Oleg Bartunov
On Mon, 26 Feb 2007, Guillaume Smet wrote: On 2/26/07, Oleg Bartunov wrote: Did you rewrite query manually or use rewrite feature of tsearch2 ? Currently, it's manual. I perform a pg_trgm query for each word of the search words (a few stop words excluded) and I generate the ts_query with the

Re: [PERFORM] pg_trgm performance

2007-02-26 Thread Guillaume Smet
On 2/26/07, Oleg Bartunov wrote: Did you rewrite query manually or use rewrite feature of tsearch2 ? Currently, it's manual. I perform a pg_trgm query for each word of the search words (a few stop words excluded) and I generate the ts_query with the similar words instead of using the search wo

Re: [PERFORM] pg_trgm performance

2007-02-26 Thread Oleg Bartunov
On Mon, 26 Feb 2007, Guillaume Smet wrote: On 2/24/07, Steinar H. Gunderson <[EMAIL PROTECTED]> wrote: Thanks for your time. GiN version, short: -> Bitmap Heap Scan on tags (cost=8.64..151.79 rows=41 width=0) (actual time=5.555..30.157 rows=7 loops=1) Filter: (title % 'foo'::t

Re: [PERFORM] pg_trgm performance

2007-02-26 Thread Guillaume Smet
On 2/24/07, Steinar H. Gunderson <[EMAIL PROTECTED]> wrote: Thanks for your time. GiN version, short: -> Bitmap Heap Scan on tags (cost=8.64..151.79 rows=41 width=0) (actual time=5.555..30.157 rows=7 loops=1) Filter: (title % 'foo'::text) -> Bitmap Index Scan on trgm_id

Re: [PERFORM] Query Planner

2007-02-26 Thread Steinar H. Gunderson
On Mon, Feb 26, 2007 at 05:19:05PM +0530, Gauri Kanekar wrote: > I have a Query. So when i do explain analyse on it , it shows me many Hash > Joins. > So is it possible to indicate the Query Planner not to consider Hash Join. set enable_hashjoin = false; This is very often the wrong solution, tho

[PERFORM] Query Planner

2007-02-26 Thread Gauri Kanekar
Hi List, I have a Query. So when i do explain analyse on it , it shows me many Hash Joins. So is it possible to indicate the Query Planner not to consider Hash Join. -- Regards Gauri

Re: [PERFORM] Very slow bytea data extraction

2007-02-26 Thread Richard Huxton
[EMAIL PROTECTED] wrote: If you look at the "actual time" it's completing very quickly indeed. So - it must be something to do with either: 1. Fetching/formatting the data 2. Transferring the data to the client. I do agree. What happens if you only select half the rows? Does the time to