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
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-docs pgsql-hackers pgsql-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

Browse pgsql-docs by date

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

Browse pgsql-hackers by date

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

Browse pgsql-patches by date

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