FW: Unions slow in IDS 7.30
Posted in 1999
This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01BF0615.2B1EE2AC Content-Type: text/plain; charset="iso-8859-1" Hmmm, Apologies for wasting your bandwidth, i have in the mean time figured it out. The union all eliminates the order by that would otherwise be done to take out the duplicates. The bit about it working fine under 7.23 is a lie - one that is apparently used often by users who wish to put pressure on their DBA after each upgrade. I'm starting to see through it :-) Regards > -----Original Message----- > From: Willem Roos > Sent: Friday, September 24, 1999 12:27 AM > To: 'Informix Mailing List' > Subject: Unions slow in IDS 7.30 > > > All, > > One of our users is running a query with a union consisting > of 2 subselects. The two subselects run fine on their own > (15 seconds). With a UNION they take more than a minute, > but with a UNION ALL they run their usual 15 seconds again. > The union vs. union all have identical query execution > plans - only the est. # of rows differs by a few hundred, > but the same cost. > > This used to be OK on 7.23 but seems to have broken on 7.30. > I've run update stats until blue in the face. Has anyone > seen this before. > > TIA > > /* ----------------------------------------------------- * > * Willem Roos (+27) 21 980 4941 * > * Forced to use M$ Outlook ## * > * ----------------------------------------------------- */ > ------_=_NextPart_001_01BF0615.2B1EE2AC Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN"> <HTML> <HEAD> <META HTTP-EQUIV=3D"Content-Type" CONTENT=3D"text/html; = charset=3Diso-8859-1"> <META NAME=3D"Generator" CONTENT=3D"MS Exchange Server version = 5.5.2448.0"> <TITLE>FW: Unions slow in IDS 7.30</TITLE> </HEAD> <BODY> <P><FONT SIZE=3D2>Hmmm,</FONT> </P> <P><FONT SIZE=3D2>Apologies for wasting your bandwidth, i have in the = mean time</FONT> <BR><FONT SIZE=3D2>figured it out. The union all eliminates the order = by that </FONT> <BR><FONT SIZE=3D2>would otherwise be done to take out the duplicates. = The bit</FONT> <BR><FONT SIZE=3D2>about it working fine under 7.23 is a lie - one that = is apparently</FONT> <BR><FONT SIZE=3D2>used often by users who wish to put pressure on = their DBA after</FONT> <BR><FONT SIZE=3D2>each upgrade. I'm starting to see through it = :-)</FONT> </P> <P><FONT SIZE=3D2>Regards</FONT> </P> <P><FONT SIZE=3D2>> -----Original Message-----</FONT> <BR><FONT SIZE=3D2>> From: Willem Roos </FONT> <BR><FONT SIZE=3D2>> Sent: Friday, September 24, 1999 12:27 = AM</FONT> <BR><FONT SIZE=3D2>> To: 'Informix Mailing List'</FONT> <BR><FONT SIZE=3D2>> Subject: Unions slow in IDS 7.30</FONT> <BR><FONT SIZE=3D2>> </FONT> <BR><FONT SIZE=3D2>> </FONT> <BR><FONT SIZE=3D2>> All,</FONT> <BR><FONT SIZE=3D2>> </FONT> <BR><FONT SIZE=3D2>> One of our users is running a query with a = union consisting</FONT> <BR><FONT SIZE=3D2>> of 2 subselects. The two subselects run fine on = their own </FONT> <BR><FONT SIZE=3D2>> (15 seconds). With a UNION they take more than = a minute, </FONT> <BR><FONT SIZE=3D2>> but with a UNION ALL they run their usual 15 = seconds again. </FONT> <BR><FONT SIZE=3D2>> The union vs. union all have identical query = execution </FONT> <BR><FONT SIZE=3D2>> plans - only the est. # of rows differs by a = few hundred, </FONT> <BR><FONT SIZE=3D2>> but the same cost.</FONT> <BR><FONT SIZE=3D2>> </FONT> <BR><FONT SIZE=3D2>> This used to be OK on 7.23 but seems to have = broken on 7.30. </FONT> <BR><FONT SIZE=3D2>> I've run update stats until blue in the face. = Has anyone</FONT> <BR><FONT SIZE=3D2>> seen this before.</FONT> <BR><FONT SIZE=3D2>> </FONT> <BR><FONT SIZE=3D2>> TIA</FONT> <BR><FONT SIZE=3D2>> </FONT> <BR><FONT SIZE=3D2>> /* = ----------------------------------------------------- *</FONT> <BR><FONT SIZE=3D2>> * Willem = Roos &n= bsp; &n= bsp; (+27) 21 980 4941 *</FONT> <BR><FONT SIZE=3D2>> * Forced to use M$ Outlook = ## &nbs= p; &nbs= p; *</FONT> <BR><FONT SIZE=3D2>> * = ----------------------------------------------------- */</FONT> <BR><FONT SIZE=3D2>> </FONT> </P> </BODY> </HTML> ------_=_NextPart_001_01BF0615.2B1EE2AC--