Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] 8.2 features?

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Chris Browne <cbbrowne(at)acm(dot)org>
Cc: pgsql-patches(at)postgresql(dot)org
Subject: Re: [HACKERS] 8.2 features?
Date: 2006-07-18 19:46:32
Message-ID: 44BD3A98.2050702@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-docspgsql-hackerspgsql-patches
Chris Browne wrote:

>chris(dot)kings-lynne(at)calorieking(dot)com (Christopher Kings-Lynne) writes:
>  
>
>>>The major downside is that somewhere between 9000 and 10000
>>>VALUES-targetlists produces "ERROR:  stack depth limit
>>>exceeded". Perhaps for the typical use-case this is sufficient
>>>though.
>>>I'm open to better ideas, comments, objections...
>>>      
>>>
>>If the use case is people running MySQL dumps, then there will be
>>millions of values-targetlists in MySQL dumps.
>>    
>>
>
>Curiosity: How do *does* TheirSQL parse that, and not have the One
>Gigantic Query blow up their query parser?
>  
>

Experimentation shows that mysqldump breaks up the insert into chunks.

Example with 10m rows:

[ad(at)wired-219 ~]# perl -e 'print "drop table if exists foo; create table 
foo (x int);\n"; foreach my $i (0..9_9999) { print "insert into foo 
values \n"; foreach my $j (0..99) { print "," if $j; print 
"(",100*$i+$j+1,")"; } print ";\n"; } ' > gggggg
[ad(at)wired-219 ~]# mysql test < gggggg
[ad(at)wired-219 ~]# mysqldump test foo > aaaaaa
[ad(at)wired-219 ~]# mysql test < aaaaaa
[ad(at)wired-219 ~]# grep INSERT aaaaaa | wc -l
104


cheers

andrew





In response to

pgsql-docs by date

Next:From: Thomas BleyDate: 2006-07-18 21:39:20
Subject: Re: [PATCHES] 8.2 features?
Previous:From: Chris BrowneDate: 2006-07-18 18:49:35
Subject: Re: [HACKERS] 8.2 features?

pgsql-hackers by date

Next:From: Dave PageDate: 2006-07-18 20:08:49
Subject: Re: Progress bar updates
Previous:From: Bruce MomjianDate: 2006-07-18 19:20:40
Subject: Re: src/tools/pginclude considered harmful (was Re:

pgsql-patches by date

Next:From: Thomas BleyDate: 2006-07-18 21:39:20
Subject: Re: [PATCHES] 8.2 features?
Previous:From: Bruce MomjianDate: 2006-07-18 19:20:40
Subject: Re: src/tools/pginclude considered harmful (was Re:

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group