[PERFORM] SELECT MIN, MAX took longer time than SELECT COUNT, MIN, MAX

2006-01-19 Thread K C Lau
The following query took 17 seconds: select count(LogSN), min(LogSN), max(LogSN) from Log where create_time < '2005/10/19'; Figuring that getting the count will involve scanning the database, I took it out, but the new query took 200 seconds: select min(LogSN), max(LogSN) from Log where crea

Re: [PERFORM] Autovacuum / full vacuum (off-topic?)

2006-01-19 Thread Bruce Momjian
Verified. I am working toward getting all those patches applied. --- Mark Kirkwood wrote: > Jim C. Nasby wrote: > > > > > I think it's a good idea, but you should take a look at the recently > > added functionality that a

Re: [PERFORM] 3WARE Card performance boost?

2006-01-19 Thread Alex Turner
He's talking about RAID 1 here, not a gargantuan RAID 6. Onboard RAM on the controller card is going to make very little difference. All it will do is allow the card to re-order writes to a point (not all cards even do this). Alex. On 1/18/06, William Yu <[EMAIL PROTECTED]> wrote: > Benjamin Ar

Re: [PERFORM] Stable function being evaluated more than once in a single

2006-01-19 Thread Bruce Momjian
Here is updated documentation for STABLE. I just changed a few words for clarification. --- Jim C. Nasby wrote: > Adding -docs... > > On Fri, Jan 13, 2006 at 07:27:28PM -0500, Tom Lane wrote: > > "Jim C. Nasby" <[EMAIL PRO

Re: [PERFORM] query plans different for 8.1 on windows and aix

2006-01-19 Thread Tom Lane
"Tim Jones" <[EMAIL PROTECTED]> writes: > Why is postgres using a sequential scan and not the index what > parameters do I need to adjust You probably initialized the AIX database in a non-C locale. See the manual concerning LIKE index optimizations. regards, tom lane ---

Re: [PERFORM] Autovacuum / full vacuum (off-topic?)

2006-01-19 Thread Mark Kirkwood
Jim C. Nasby wrote: I think it's a good idea, but you should take a look at the recently added functionality that allows you to investigate the contests of the FSM via a user function (this is either in 8.1 or in HEAD; I can't remember which). AFAICS it is still in the patch queue for 8.2. I

[PERFORM] query plans different for 8.1 on windows and aix

2006-01-19 Thread Tim Jones
Hi,     I am trying to perform the following type of query  'select patientname ... from patient were patientname LIKE 'JONES%, %' order by patientname asc limit 100'. There about 1.4 million rows in the table. On my windows machine (2GB Ram ,3Ghz, Windows XP, 120GB Hard Drive, postgres 8.1

Re: [PERFORM] 3WARE Card performance boost?

2006-01-19 Thread Vivek Khera
On Jan 18, 2006, at 1:09 PM, Benjamin Arai wrote: Obviously, I have done this to improve write performance for the update each week. My question is if I install a 3ware or similar card to replace my I'll bet that if you increase your checkpoint_segments (and corresponding timeout value)

Re: [PERFORM] Stored Procedures

2006-01-19 Thread Andreas Kretschmer
Benjamin Arai <[EMAIL PROTECTED]> schrieb: > Hi, > > Will simple queries such as "SELECT * FROM blah_table WHERE tag='x'; work any > faster by putting them into a stored procedure? IMHO no, why do you think so? You can use PREPARE instead, if you have many selects like this. HTH, Andreas --

[PERFORM] Stored Procedures

2006-01-19 Thread Benjamin Arai
Hi,   Will simple queries such as "SELECT * FROM blah_table WHERE tag='x'; work any faster by putting them into a stored procedure?   Benjamin Arai [EMAIL PROTECTED] http://www.benjaminarai.com  

Re: [PERFORM] Use of Stored Procedures and

2006-01-19 Thread Markus Schaber
Hi, Marcos, Marcos wrote: >>Which interface are you using to connect to PostgreSQL? libpq, libpqxx, >>pgjdbc, python-popy? >> >>E. G. PGJDBC handles prepared plans transparently by using the >>PreparedStatement class. >> >>If you use command line PSQL, you can use the PREPARE commands. > > I'm us

Re: [PERFORM] Use of Stored Procedures and

2006-01-19 Thread Marcos
> Which interface are you using to connect to PostgreSQL? libpq, libpqxx, > pgjdbc, python-popy? > > E. G. PGJDBC handles prepared plans transparently by using the > PreparedStatement class. > > If you use command line PSQL, you can use the PREPARE commands. I'm using the adodb to call the store

Re: [PERFORM] Use of Stored Procedures and

2006-01-19 Thread Markus Schaber
Hi, Marcos, Marcos wrote: >>What problem are you trying to solve? > > I want know how I make to use a prepared plan > ( http://www.postgresql.org/docs/8.1/static/sql-prepare.html ). I read > that I need to use the SPI_PREPARE and SPI_EXEC in my code, but I didn't > understand how make it. Which

Re: [PERFORM] Use of Stored Procedures and

2006-01-19 Thread Marcos
> What statements? Sorry. Statements is my code. > What problem are you trying to solve? I want know how I make to use a prepared plan ( http://www.postgresql.org/docs/8.1/static/sql-prepare.html ). I read that I need to use the SPI_PREPARE and SPI_EXEC in my code, but I didn't understand how