[HACKERS] slow SP with temporary tables, any idea of solution?

2005-02-09 Thread Pavel Stehule
Hello I have very slow SP this type: BEGIN CREATE TEMP TABLE xxx ON COMMIT DROP(); WHILE n > 0 LOOP -- n >> 0 FOR _r IN EXECUTE 'SELECT ...' LOOP RETURN NEXT _r; EXECUTE 'UPDATE xxx SET item = 1 WHERE id = '||_r.id; n := n - 1; END LOOP; END LOOP; END; The mai

Re: [HACKERS] [SQL] Function .. AS..?

2005-02-09 Thread Michael Fuhr
On Wed, Feb 09, 2005 at 04:57:14PM -0400, Ing. Jhon Carrillo wrote: > Those instructions are good but i want to call this function only > for " select consulta_contacto(1)" nothing more, Is really necesary > to use "AS ..."? > > this is the call: > > select * from consulta_contacto(1) as (c

Re: [HACKERS] Function .. AS..?

2005-02-09 Thread Stephan Szabo
On Wed, 9 Feb 2005, Ing. Jhon Carrillo wrote: > Those instructions are good but i want to call this function only for " > select consulta_contacto(1)" nothing more, Is really necesary to use > "AS ..."? If it absolutely needs to be setof record, yes. It may be more appropriate to make a composi

[HACKERS] Function .. AS..?

2005-02-09 Thread Ing. Jhon Carrillo
Those instructions are good but i want  to call this function  only  for  " select  consulta_contacto(1)"  nothing more,  Is really necesary to use  "AS ..."?   this is  the call:     select * from  consulta_contacto(1) as (cont_codigo  integer,    

[HACKERS] enforcing a plan

2005-02-09 Thread Hicham G. Elmongui
I am doing an experiment in which I need the following: SET enable_mergejoin = false; SET enable_hashjoin = false; SELECT ... FROM tab00 as T00, tab01 as T01, tab02 as T02, tab03 as T03 WHERE T00.id = T01.id AND T00.id = T02.id AND T00.id = T03.id LIMIT 51; There's an index on each primary k

Re: [HACKERS] Query optimizer 8.0.1 (and 8.0)

2005-02-09 Thread David Fetter
On Wed, Feb 09, 2005 at 07:30:16PM -0500, [EMAIL PROTECTED] wrote: > > Mark, > > > >> Hey, I can give you a copy of RT1 which is fine, but it is 1.1G > >> compressed. I'd have to mail you a DVD. > > > > Sure, cool. > > > [address info sniped] > > I would be willing to send a couple DVDs (on a regu

Re: [HACKERS] Query optimizer 8.0.1 (and 8.0)

2005-02-09 Thread pgsql
> On Wed, Feb 09, 2005 at 07:30:16PM -0500, [EMAIL PROTECTED] wrote: >> I would love to keep these things current for PG development, but my >> company's server is on a plan that gets 1G free, and is billed after >> that. Also, I am on a broadband line at my office, and uploading the >> data >> wo

Re: [HACKERS] Query optimizer 8.0.1 (and 8.0)

2005-02-09 Thread Jim C. Nasby
On Wed, Feb 09, 2005 at 07:30:16PM -0500, [EMAIL PROTECTED] wrote: > I would love to keep these things current for PG development, but my > company's server is on a plan that gets 1G free, and is billed after > that. Also, I am on a broadband line at my office, and uploading the data > would take

Re: [HACKERS] Query optimizer 8.0.1 (and 8.0)

2005-02-09 Thread pgsql
> Mark, > >> Hey, I can give you a copy of RT1 which is fine, but it is 1.1G >> compressed. I'd have to mail you a DVD. > > Sure, cool. > [address info sniped] I would be willing to send a couple DVDs (on a regular basis) to anyone who is able to post this on a good mirror that anyone could get at

Re: [HACKERS] Query optimizer 8.0.1 (and 8.0)

2005-02-09 Thread Bruce Momjian
Josh Berkus wrote: > Mark, Stephen, etc: > > > > I can see your point, however I wonder if the issue is that the default > > > stats settings of '10' (3000 rows, 10 histogram buckets) is too low, and > > > maybe we should consider making a higher value (say '100') the default. > > > > Personally,

Re: [HACKERS] libpq API incompatibility between 7.4 and 8.0

2005-02-09 Thread Bruce Momjian
Martin Pitt wrote: -- Start of PGP signed section. > Hi! > > Tom Lane [2005-02-04 10:27 -0500]: > > This problem isn't worth spending more development time on than it takes > > to change SO_MAJOR_VERSION (we have lots of higher-priority issues). > > I just did that: > > --- postgresql-8.0.1-old/

Re: [HACKERS] [GENERAL] PHP/PDO Database Abstraction Layer

2005-02-09 Thread Gavin M. Roy
PDO just went into beta, and can be downloaded from http://pecl.php.net/package/pdo to be compiled into previous versions of PHP. We really should get some PHP and PgSQL people onto making sure the PgSQL driver is top notch (if it isn't already). Gavin On Mon, 2005-02-07 at 20:21 -0800, Joshua

Re: [HACKERS] Query optimizer 8.0.1 (and 8.0)

2005-02-09 Thread pgsql
I wrote a message caled "One Big trend vs multiple smaller trends in table statistics" that, I think, explains what we've been seeing. > [EMAIL PROTECTED] wrote: >> >> In this case, the behavior observed could be changed by altering the >> sample size for a table. I submit that an arbitrary fixed

Re: [HACKERS] Is there a way to make VACUUM run completely outside

2005-02-09 Thread Hannu Krosing
Ühel kenal päeval (teisipäev, 8. veebruar 2005, 13:39-0300), kirjutas Alvaro Herrera: > On Tue, Feb 08, 2005 at 01:55:47PM +0200, Hannu Krosing wrote: > > > So I guess that making it commit and open new transaction at a regular > > interval (like each minute) during vacuuming single table would no

[HACKERS] Repleacement for src/port/snprintf.c

2005-02-09 Thread Nicolai Tufar
Hello all, I would like to submit my changes to src/port/snprintf.c to enable %n$ format placeholder replacement in snprintf() and vsnprintf(). Additionally I implemented a trivial printf(). I also attach a diff for configure.in to include snprintf.o in pgport but I am sure it is not the right th