[GENERAL] VACUUM PANIC: corrupted item pointer

2008-10-17 Thread André Volpato
Hi, We got a corrupted database server, and I need some advice on what else can I do. Specs: - Postgres 8.3.3 @ Linux dbserver4 2.6.24-etchnhalf.1-686-bigmem - 4 GB RAM - PGDATA with 700GB (70GB used), software RAID-0 with 3 sata-2 (blame it on me, ugh...) So, the steps till now: 1 - Vacuum

Re: [GENERAL] VACUUM PANIC: corrupted item pointer

2008-10-17 Thread André Volpato
André Volpato escreveu: 10. Same error # psql matriz psql: FATAL: could not read block 0 of relation 1664/0/2676: read only 0 of 8192 bytes Right now this is the message I got every time I try to connect, even in single mode. We tried to fsck the raid partition, but with no luck. Hope

Re: [GENERAL] VACUUM PANIC: corrupted item pointer

2008-10-17 Thread André Volpato
Tom Lane escreveu: =?ISO-8859-1?Q?Andr=E9_Volpato?= [EMAIL PROTECTED] writes: 8. Postgres is up, but... # psql matriz psql: FATAL: could not read block 0 of relation 1664/0/2676: read only 0 of 8192 bytes Looks like your raid array is dying under you :-( ... We hope it last more 3

Re: [GENERAL] Converting string to IN query

2008-09-12 Thread André Volpato
Andrus escreveu: snip SELECT * FROM invoices WHERE invoiceno IN ( '1,3,4' ); but this causes error. snip change it to ( '1','3','4' ) or ( 1,3,4 ) -- ACV -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your subscription:

Re: [GENERAL] creating a perfect sequence column

2008-07-07 Thread André Volpato
. Sure, there is a rownum() implementation from depesz [1] that works nice for reports. [1] http://www.depesz.com/index.php/2007/08/17/rownum-anyone-cumulative-sum-in-one-query/ -- André Volpato -- Sent via pgsql-general mailing list (pgsql-general@postgresql.org) To make changes to your

Re: [GENERAL] PostgreSQL and MOLAP ?

2008-03-11 Thread André Volpato
. :) Try out JPivot too, Mondrian will give you MDX support, an JPivot is like a web frontend. Follow the instructions here [1] and good luck. [1] http://mondrian.pentaho.org/documentation/installation.php -- []´s, André Volpato Ecom Tecnologia LTDA - Análise e Desenvolvimento [EMAIL PROTECTED

Re: [GENERAL] Hash join in 8.3

2007-12-14 Thread André Volpato
Gregory Stark escreveu: André Volpato [EMAIL PROTECTED] writes: I think I found the answer! 8.1: likes nested loop even after vacuumdb on the database.br 8.3: likes hash at first time but: - after vacuumdb *on the database* (I was running on the tables.), it turns out to: Merge Join

[GENERAL] Hash join in 8.3

2007-12-13 Thread André Volpato
be rewritten for 8.3) 2. Vacuum is up2date! 3. Is there any way to make [2] use the index ? -- []´s, André Volpato Ecom Tecnologia LTDA - Análise e Desenvolvimento [EMAIL PROTECTED] ---(end of broadcast)--- TIP 9: In versions below 8.0

Re: [GENERAL] Hash join in 8.3

2007-12-13 Thread André Volpato
Gregory Stark escreveu: André Volpato [EMAIL PROTECTED] writes: And the query: # select j.i, t.t from jtest j inner join test t on t.i = j.i where (j.i*1.5) between 300 and 400; Planner for [1]: Nested Loop (cost=0.00..270192.02 rows=2 width=41) (actual Planner for [2

Re: [GENERAL] Hash join in 8.3

2007-12-13 Thread André Volpato
this tests I disabled autovacuum, and run vacuum analyze test / jtest before. -- []´s, André Volpato Ecom Tecnologia LTDA - Análise e Desenvolvimento [EMAIL PROTECTED] ---(end of broadcast)--- TIP 1: if posting/reading through Usenet, please send

Re: [GENERAL] Hash join in 8.3

2007-12-13 Thread André Volpato
Tom Lane escreveu: Gregory Stark [EMAIL PROTECTED] writes: But I'm curious if you turn off mergejoin whether you can get a Nested Loop plan and what cost 8.3 gives it. It looks to me like 8.3 came up with a higher cost for Nested Loop than 8.1.9 (I think 8.1.10 came out with some

Re: [GENERAL] Creating indexes

2007-12-10 Thread André Volpato
, you show the desired html. -- []´s, André Volpato Ecom Tecnologia LTDA - Análise e Desenvolvimento [EMAIL PROTECTED] ---(end of broadcast)--- TIP 4: Have you searched our list archives? http://archives.postgresql.org/

Re: [GENERAL] Postgresql simple query performance question

2007-11-07 Thread André Volpato
Reid Thompson escreveu: On Tue, 2007-11-06 at 14:39 -0300, André Volpato wrote: Remember that you can always use serial fields to count a table, like: alter table foo add id serial; select id from foo order by id desc limit 1; This should return the same value than count

Re: [GENERAL] Postgresql simple query performance question

2007-11-06 Thread André Volpato
Richard Huxton escreveu: Reg Me Please wrote: While I would not spend resources in fine tuning the count(*), I would spend some to underastand why and how the other ones do it better. Just to be better. The problem is well understood, and there is extensive discussion in the mailing lists

[GENERAL] Filter sequence

2007-11-05 Thread André Volpato
Hi all, I´m experiencing an unexpected behaviour in the planner. I want the planner to apply a function in the results of a subquery, but its doing a filter in the hole table. The results between the mixed filters are the same in the end, but its taking ages. What I want is the planner to

Re: [GENERAL] multiple row insertion

2007-10-04 Thread André Volpato
Alvaro Herrera escreveu: test tester escribi: On 10/4/07, test tester [EMAIL PROTECTED] wrote: i have version 8.1 and i want to know how to insert multiple rows in this version. Upgrade. Use COPY instead. Put you data into a var, and

Re: [GENERAL] Large Result and Memory Limit

2007-10-04 Thread André Volpato
Mike Ginsburg escreveu: Hello, I am working on a personnel registry that has upwards of 50,000 registrants. Currently I am working on an export module that will create a CSV from multiple tables. I have managed to keep the script (PHP) under the memory limit okay... some info needed

Re: [GENERAL] Large Result and Memory Limit

2007-10-04 Thread André Volpato
Mike Ginsburg escreveu: André Volpato wrote: Mike Ginsburg escreveu: Hello, I am working on a personnel registry that has upwards of 50,000 registrants. Currently I am working on an export module that will create a CSV from multiple tables. I have managed to keep the script (PHP) under

Re: [GENERAL] Large Result and Memory Limit

2007-10-04 Thread André Volpato
Alvaro Herrera escreveu: Mike Ginsburg wrote: Hello, I am working on a personnel registry that has upwards of 50,000 registrants. Currently I am working on an export module that will create a CSV from multiple tables. I have managed to keep the script (PHP) under the memory

[GENERAL] Metadata

2007-08-30 Thread André Volpato
Hello, I need constraint definitions like pg_indexes.indexdef , in order to drop / create them on the fly. BTW, where can I find a complete doc about Postgres Metadata ? - AV ---(end of broadcast)--- TIP 1: if posting/reading through Usenet,

Re: [GENERAL] Data Mart with Postgres

2007-08-09 Thread André Volpato
Decibel! escreveu: On Wed, Aug 08, 2007 at 08:56:47AM -0300, Andr? Volpato wrote: Hello everybody, Im working with a small project to a client, using Postgres to store data in a dimensional model, fact-oriented, e.g., a Datamart. At this time, all I have is a populated database,

[GENERAL] Data Mart with Postgres

2007-08-08 Thread André Volpato
Hello everybody, Im working with a small project to a client, using Postgres to store data in a dimensional model, fact-oriented, e.g., a Datamart. At this time, all I have is a populated database, with the "star schemma" common relations (PKs / FKs). Below is a list of the main goals of

Re: [GENERAL] PG for DataWarehouse type Queries

2007-08-03 Thread André Volpato
, 300 columns per table) Joins are done in the form of Left joins (sometimes on the same tables, due to normalisation) Is 30min - 2hours too long or is this considered normal?? What do you mean for 'Datawarehouse queries' ? Is there any OLAP server between youp app and Postrgres? -- []´s, André

[GENERAL] Faster data type for one-length values

2007-05-23 Thread André Volpato
Hello, I need to store one-length values like '1', '2', '3' or '4' . Today, this field is indexed with btree and is of type smallint (int2). How much performance will be improved if I change it to char (1 byte length) ? Or int2 is the best solution in this case ? Thanks ! -- []´s, André

Re: [GENERAL] Faster data type for one-length values

2007-05-23 Thread André Volpato
Tom Lane escreveu: =?ISO-8859-1?Q?Andr=E9_Volpato?= [EMAIL PROTECTED] writes: I need to store one-length values like '1', '2', '3' or '4' . Today, this field is indexed with btree and is of type smallint (int2). How much performance will be improved if I

Re: [GENERAL] Faster data type for one-length values

2007-05-23 Thread André Volpato
André Volpato escreveu: Tom Lane escreveu: =?ISO-8859-1?Q?Andr=E9_Volpato?= [EMAIL PROTECTED] writes: I need to store one-length values like '1', '2', '3' or '4' . Today, this field is indexed with btree and is of type smallint (int2). How much performance will be improved if I

[GENERAL] Remove query results from cache

2007-05-23 Thread André Volpato
not 'forget' the results of any query until the cache reach 2 Gb (total box RAM) , or the server is rebooted. -- []´s, André Volpato ECOM Tecnologia Ltda [EMAIL PROTECTED] (41) 3014 2322 ---(end of broadcast)--- TIP 5: don't forget to increase your