Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 07:23 AM
Philip Sherman
Guest
 
Posts: n/a
Default Should a very complex SQL statement crash the instance?

SELECT columns
FROM t1
JOIN t2
  #2  
Old November 12th, 2005, 07:23 AM
Mark A
Guest
 
Posts: n/a
Default Re: Should a very complex SQL statement crash the instance?

"Philip Sherman" <psherman@ameritech.net> wrote in message
news:guZmc.397$gV7.360@newssvr32.news.prodigy.com. ..[color=blue]
> SELECT columns
> FROM t1
> JOIN t2
> .
> .
> .
> WHERE predicates
>
> The from/join contains 5 tables, one of which is created from a select
> statement.
>
> The columns area contains 35 selects, some of them containing a join,
> referencing a total of 40 tables.
>
> UDB 8.1 Windows and Linux both hard crashed (complete instance shutdown)
> trying to process this statement. (Yes, I have dumps from Linux and may
> be able to get to the Windows dumps next week.)
>
> Please don't ask me where this came from - I didn't write it and just
> have to make it work within the next two days.
>[/color]
Check the SQL limits in the SQL Reference for the most tables or joins in
one statement. If you are not on fixpak 5, I would install it now.

I don't care where it came from, but the person who did it should be tarred
and feathered.


  #3  
Old November 12th, 2005, 07:23 AM
Mark A
Guest
 
Posts: n/a
Default Re: Should a very complex SQL statement crash the instance?

"Philip Sherman" <psherman@ameritech.net> wrote in message
news:guZmc.397$gV7.360@newssvr32.news.prodigy.com. ..[color=blue]
> SELECT columns
> FROM t1
> JOIN t2
> .
> .
> .
> WHERE predicates
>
> The from/join contains 5 tables, one of which is created from a select
> statement.
>
> The columns area contains 35 selects, some of them containing a join,
> referencing a total of 40 tables.
>
> UDB 8.1 Windows and Linux both hard crashed (complete instance shutdown)
> trying to process this statement. (Yes, I have dumps from Linux and may
> be able to get to the Windows dumps next week.)
>
> Please don't ask me where this came from - I didn't write it and just
> have to make it work within the next two days.
>[/color]
Check the SQL limits in the SQL Reference for the most tables or joins in
one statement. If you are not on fixpak 5, I would install it now.

I don't care where it came from, but the person who did it should be tarred
and feathered.


  #4  
Old November 12th, 2005, 07:23 AM
Philip Sherman
Guest
 
Posts: n/a
Default Re: Should a very complex SQL statement crash the instance?

We are on FP5.

I went through the limits section of SQL REF V1 3 times and couldn't
find that particular limit. Maybe age is getting to my eyes.

Phil Sherman


Mark A wrote:
[color=blue]
>
> Check the SQL limits in the SQL Reference for the most tables or joins in
> one statement. If you are not on fixpak 5, I would install it now.
>
> I don't care where it came from, but the person who did it should be tarred
> and feathered.
>
>[/color]

  #5  
Old November 12th, 2005, 07:23 AM
Philip Sherman
Guest
 
Posts: n/a
Default Re: Should a very complex SQL statement crash the instance?

We are on FP5.

I went through the limits section of SQL REF V1 3 times and couldn't
find that particular limit. Maybe age is getting to my eyes.

Phil Sherman


Mark A wrote:
[color=blue]
>
> Check the SQL limits in the SQL Reference for the most tables or joins in
> one statement. If you are not on fixpak 5, I would install it now.
>
> I don't care where it came from, but the person who did it should be tarred
> and feathered.
>
>[/color]

  #6  
Old November 12th, 2005, 07:23 AM
Jonathan Leffler
Guest
 
Posts: n/a
Default Re: Should a very complex SQL statement crash the instance?

Philip Sherman wrote:
[color=blue]
> SELECT columns
> FROM t1
> JOIN t2
> .
> .
> .
> WHERE predicates
>
> The from/join contains 5 tables, one of which is created from a select
> statement.
>
> The columns area contains 35 selects, some of them containing a join,
> referencing a total of 40 tables.
>
> UDB 8.1 Windows and Linux both hard crashed (complete instance shutdown)
> trying to process this statement. (Yes, I have dumps from Linux and may
> be able to get to the Windows dumps next week.)
>
> Please don't ask me where this came from - I didn't write it and just
> have to make it work within the next two days.[/color]


If this were IBM Informix Dynamic Server, I'd answer "No; no statement
is allowed to crash the server". The server may decline to answer,
generate errors where you can see an answer could be produced, or any
of a number of other things (not excluding producing the right
answer), but the server may not crash because of what you asked it to
do. If there was a question of exceeding a server limit, the server
is allowed to diagnose this, but it still isn't allowed to crash.

I imagine the DB2 development team feels somewhat similarly about DB2.

--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/

  #7  
Old November 12th, 2005, 07:23 AM
Jonathan Leffler
Guest
 
Posts: n/a
Default Re: Should a very complex SQL statement crash the instance?

Philip Sherman wrote:
[color=blue]
> SELECT columns
> FROM t1
> JOIN t2
> .
> .
> .
> WHERE predicates
>
> The from/join contains 5 tables, one of which is created from a select
> statement.
>
> The columns area contains 35 selects, some of them containing a join,
> referencing a total of 40 tables.
>
> UDB 8.1 Windows and Linux both hard crashed (complete instance shutdown)
> trying to process this statement. (Yes, I have dumps from Linux and may
> be able to get to the Windows dumps next week.)
>
> Please don't ask me where this came from - I didn't write it and just
> have to make it work within the next two days.[/color]


If this were IBM Informix Dynamic Server, I'd answer "No; no statement
is allowed to crash the server". The server may decline to answer,
generate errors where you can see an answer could be produced, or any
of a number of other things (not excluding producing the right
answer), but the server may not crash because of what you asked it to
do. If there was a question of exceeding a server limit, the server
is allowed to diagnose this, but it still isn't allowed to crash.

I imagine the DB2 development team feels somewhat similarly about DB2.

--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2003.04 -- http://dbi.perl.org/

  #8  
Old November 12th, 2005, 07:23 AM
Serge Rielau
Guest
 
Posts: n/a
Default Re: Should a very complex SQL statement crash the instance?

> I imagine the DB2 development team feels somewhat similarly about DB2.
Absolutely and unconditionally!!

Having that said Wndows (I don't know about Linux) reacts in a very
alergic way to stack overflow and there is precious little DB2 can do to
soften the blow once the stack is exceeded.
We have seen (and fixed) Windows stack overflows in stress testing for
VERY long chains of predicates such as:
prd1 AND prd2 AND prd2 AND .. AND prdn (we are talking hundreds in my
experience)

First assure you are on FP5. If the problem persists please contact
support so we can fix it.
There also is a db2 utility you can use to increae the stack size.
- which's name I keep forgetting :-(

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
  #9  
Old November 12th, 2005, 07:23 AM
Serge Rielau
Guest
 
Posts: n/a
Default Re: Should a very complex SQL statement crash the instance?

> I imagine the DB2 development team feels somewhat similarly about DB2.
Absolutely and unconditionally!!

Having that said Wndows (I don't know about Linux) reacts in a very
alergic way to stack overflow and there is precious little DB2 can do to
soften the blow once the stack is exceeded.
We have seen (and fixed) Windows stack overflows in stress testing for
VERY long chains of predicates such as:
prd1 AND prd2 AND prd2 AND .. AND prdn (we are talking hundreds in my
experience)

First assure you are on FP5. If the problem persists please contact
support so we can fix it.
There also is a db2 utility you can use to increae the stack size.
- which's name I keep forgetting :-(

Cheers
Serge

--
Serge Rielau
DB2 SQL Compiler Development
IBM Toronto Lab
  #10  
Old November 12th, 2005, 07:23 AM
Mark Yudkin
Guest
 
Posts: n/a
Default Re: Should a very complex SQL statement crash the instance?

I see nothing untoward about a 40 table query. And obviously DB2 should not
be crashing.

As Serge says, check you're on 8.1.5, then open a PMR against the bug.

"Mark A" <ma@switchboard.net> wrote in message
news:4GZmc.1453$hy5.36078@news.uswest.net...[color=blue]
> "Philip Sherman" <psherman@ameritech.net> wrote in message
> news:guZmc.397$gV7.360@newssvr32.news.prodigy.com. ..[color=green]
> > SELECT columns
> > FROM t1
> > JOIN t2
> > .
> > .
> > .
> > WHERE predicates
> >
> > The from/join contains 5 tables, one of which is created from a select
> > statement.
> >
> > The columns area contains 35 selects, some of them containing a join,
> > referencing a total of 40 tables.
> >
> > UDB 8.1 Windows and Linux both hard crashed (complete instance shutdown)
> > trying to process this statement. (Yes, I have dumps from Linux and may
> > be able to get to the Windows dumps next week.)
> >
> > Please don't ask me where this came from - I didn't write it and just
> > have to make it work within the next two days.
> >[/color]
> Check the SQL limits in the SQL Reference for the most tables or joins in
> one statement. If you are not on fixpak 5, I would install it now.
>
> I don't care where it came from, but the person who did it should be[/color]
tarred[color=blue]
> and feathered.
>
>[/color]


  #11  
Old November 12th, 2005, 07:23 AM
Mark Yudkin
Guest
 
Posts: n/a
Default Re: Should a very complex SQL statement crash the instance?

I see nothing untoward about a 40 table query. And obviously DB2 should not
be crashing.

As Serge says, check you're on 8.1.5, then open a PMR against the bug.

"Mark A" <ma@switchboard.net> wrote in message
news:4GZmc.1453$hy5.36078@news.uswest.net...[color=blue]
> "Philip Sherman" <psherman@ameritech.net> wrote in message
> news:guZmc.397$gV7.360@newssvr32.news.prodigy.com. ..[color=green]
> > SELECT columns
> > FROM t1
> > JOIN t2
> > .
> > .
> > .
> > WHERE predicates
> >
> > The from/join contains 5 tables, one of which is created from a select
> > statement.
> >
> > The columns area contains 35 selects, some of them containing a join,
> > referencing a total of 40 tables.
> >
> > UDB 8.1 Windows and Linux both hard crashed (complete instance shutdown)
> > trying to process this statement. (Yes, I have dumps from Linux and may
> > be able to get to the Windows dumps next week.)
> >
> > Please don't ask me where this came from - I didn't write it and just
> > have to make it work within the next two days.
> >[/color]
> Check the SQL limits in the SQL Reference for the most tables or joins in
> one statement. If you are not on fixpak 5, I would install it now.
>
> I don't care where it came from, but the person who did it should be[/color]
tarred[color=blue]
> and feathered.
>
>[/color]


 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,248 network members.