Subject Re: [firebird-support] Error While Executing Simple Inner Join SQL With Big database
Author Thomas Steinmaurer
Vishal Tiwari vishualsoft@... [firebird-support] schrieb am 08.06.2015 10:16:

> Hi Thomas Steinmaurer,
> I have given temporary directories path as below and SQL is now executing and
> showing the results as well.
> TempDirectories = c:\temp.  
> But there is one speed issue I am facing, if I take off some fields which is of
> type "Blob sub_type 1" then sql execution takes 4 and half seconds, else it
> takes 56 seconds.
> Any idea how to optimize sql speed with such columns whose data type is "Blob
> sub_type 1"

By omitting unnecessary fields in the field list and/or reducing the result set.



--
With regards,
Thomas Steinmaurer
http://www.upscene.com

Professional Tools and Services for Firebird
FB TraceManager, IB LogManager, Database Health Check, Tuning etc.


> Thanks. 
>
>
> On Monday, 8 June 2015 12:51 PM, "'Thomas Steinmaurer' ts@...
> [firebird-support]" <firebird-support@yahoogroups.com> wrote:
>
>
>   > I have 8 GB RAM, how much else does it need ?
>
> Having 8GB RAM does not necessarily mean that Firebird is utilizing a vast
> majority of that.
>
> Page buffers at database level or default in firebird.conf, TempCacheLimit in
> firebird.conf, etc. are the main configuration settings RAM usage wise.
>
>>>> You may point temporary location configured in firebird.conf to a different
>>>>destination.
>> Could you help in, how do I configure to a different location using
>> firebird.conf file ?
>
> Check out the TempDirectories configuration parameter in firebird.conf
>
> --
> With regards,
> Thomas Steinmaurer
> http://www.upscene.com
>
> Professional Tools and Services for Firebird
> FB TraceManager, IB LogManager, Database Health Check, Tuning etc.
>
>> So I could give a try.
>> Thanks.  
>>
>>
>> On Monday, 8 June 2015 11:44 AM, "'Thomas Steinmaurer' ts@...
>> [firebird-support]" <firebird-support@yahoogroups.com> wrote:
>>
>>
>>   > I think the image posting is not allowed here to display.
>>> Below is the error message I see:
>>> Note I have 2.75 GB free disk space.
>>> *** IBPP::SQLException ***Context: Statement::FetchMessage: isc_dsql_fetch
>>> failed
>>> SQL Message : -901Unsuccessful execution caused by system error that does
>>> notpreclude successful execution of subsequent statements
>>> Engine Code : 335544675Enginne Message : sort errorNo free space found in
>>> temporary directoriesoperating system directive WriteFile failedThere is not
>>> enough space on the disk.
>>
>> The error message makes it pretty clear. Right?
>>
>> The Firebird server needs disk based temporary storage to process your
>> statement and runs out of space. You may point temporary location configured
>> in
>> firebird.conf to a different destination.
>>
>> Depending on the available RAM, you may also want to increase RAM usage for
>> temp storage used by sorts, group by etc.
>>
>> --
>> With regards,
>> Thomas Steinmaurer
>> http://www.upscene.com
>>
>> Professional Tools and Services for Firebird
>> FB TraceManager, IB LogManager, Database Health Check, Tuning etc.
>>
>>> On Monday, 8 June 2015 10:28 AM, "Robert martin rob@...
>>> [firebird-support]" <firebird-support@yahoogroups.com> wrote:
>>>
>>>
>>>
>>> Hi
>>>
>>> I don't know what the error message is, you didn't include it! but it is
>>> likely your join is wrong and returning one of every detail record for
>>> every header (i.e. 78000 * 3000 records !)
>>>
>>> Check your query and make sure the detail records are linked to the
>>> master correctly (i.e. JOIN detail d ON d.ForeignkeyField =
>>> m.primarykeyfield)
>>>
>>> Post your SQL if you cant see the cause :)
>>>
>>> Cheers
>>> Rob
>>>
>>>
>>>
>>> On 8/06/2015 4:49 p.m., Vishal Tiwari vishualsoft@...
>>> [firebird-support] wrote:
>>>> There is enough free disk space (2.75 GB) available.
>>>>
>>>>
>>>>
>>>> On Monday, 8 June 2015 10:08 AM, "Vishal Tiwari vishualsoft@...
>>>> [firebird-support]" <firebird-support@yahoogroups.com> wrote:
>>>>
>>>>
>>>> Hi All,
>>>> I am running one SQL in that Master table has 78 thousand plus records
>>>> and detail table has 4 Laks and 3 thousand plus records. I have used
>>>> Inner Join on the primary key of Master table with the column in the
>>>> Detail Table.
>>>> When I execute with small size database, but with this database when I
>>>> run SQL using Flamerobin, I get below error.
>>>> Please help.
>>>>
>>>> With Best Regards.
>>>> Vishal
>>>>
>>>> [Non-text portions of this message have been removed]
>>>>
>>>>
>>>
>>>
>>>
>>> ------------------------------------
>>>
>>> ------------------------------------
>>>
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>>
>>> Visit http://www.firebirdsql.org and click the Documentation item
>>> on the main (top) menu.  Try FAQ and other links from the left-side menu
>>> there.
>>>
>>> Also search the knowledgebases at
>>> http://www.ibphoenix.com/resources/documents/
>>>
>>>
>>> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>>> ------------------------------------
>>>
>>> Yahoo Groups Links
>>>
>>>
>>>
>>>
>>>
>>>
>>
>> #yiv8470420125 #yiv8470420125 -- #yiv8470420125ygrp-mkp {border:1px solid
>> #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv8470420125
>> #yiv8470420125ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv8470420125
>> #yiv8470420125ygrp-mkp #yiv8470420125hd
>> {color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px
>> 0;}#yiv8470420125 #yiv8470420125ygrp-mkp #yiv8470420125ads
>> {margin-bottom:10px;}#yiv8470420125 #yiv8470420125ygrp-mkp .yiv8470420125ad
>> {padding:0 0;}#yiv8470420125 #yiv8470420125ygrp-mkp .yiv8470420125ad p
>> {margin:0;}#yiv8470420125 #yiv8470420125ygrp-mkp .yiv8470420125ad a
>> {color:#0000ff;text-decoration:none;}#yiv8470420125 #yiv8470420125ygrp-sponsor
>> #yiv8470420125ygrp-lc {font-family:Arial;}#yiv8470420125
>> #yiv8470420125ygrp-sponsor #yiv8470420125ygrp-lc #yiv8470420125hd {margin:10px
>> 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv8470420125
>> #yiv8470420125ygrp-sponsor #yiv8470420125ygrp-lc .yiv8470420125ad
>> {margin-bottom:10px;padding:0 0;}#yiv8470420125 #yiv8470420125actions
>> {font-family:Verdana;font-size:11px;padding:10px 0;}#yiv8470420125
>> #yiv8470420125activity
>> {background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv8470420125
>> #yiv8470420125activity span {font-weight:700;}#yiv8470420125
>> #yiv8470420125activity span:first-child
>> {text-transform:uppercase;}#yiv8470420125 #yiv8470420125activity span a
>> {color:#5085b6;text-decoration:none;}#yiv8470420125 #yiv8470420125activity
>> span span {color:#ff7900;}#yiv8470420125 #yiv8470420125activity span
>> .yiv8470420125underline {text-decoration:underline;}#yiv8470420125
>> .yiv8470420125attach
>> {clear:both;display:table;font-family:Arial;font-size:12px;padding:10px
>> 0;width:400px;}#yiv8470420125 .yiv8470420125attach div a
>> {text-decoration:none;}#yiv8470420125 .yiv8470420125attach img
>> {border:none;padding-right:5px;}#yiv8470420125 .yiv8470420125attach label
>> {display:block;margin-bottom:5px;}#yiv8470420125 .yiv8470420125attach label a
>> {text-decoration:none;}#yiv8470420125 blockquote {margin:0 0 0
>> 4px;}#yiv8470420125 .yiv8470420125bold
>> {font-family:Arial;font-size:13px;font-weight:700;}#yiv8470420125
>> .yiv8470420125bold a {text-decoration:none;}#yiv8470420125
>> dd.yiv8470420125last p a {font-family:Verdana;font-weight:700;}#yiv8470420125
>> dd.yiv8470420125last p span
>> {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv8470420125
>> dd.yiv8470420125last p span.yiv8470420125yshortcuts
>> {margin-right:0;}#yiv8470420125 div.yiv8470420125attach-table div div a
>> {text-decoration:none;}#yiv8470420125 div.yiv8470420125attach-table
>> {width:400px;}#yiv8470420125 div.yiv8470420125file-title a, #yiv8470420125
>> div.yiv8470420125file-title a:active, #yiv8470420125
>> div.yiv8470420125file-title a:hover, #yiv8470420125
>> div.yiv8470420125file-title a:visited {text-decoration:none;}#yiv8470420125
>> div.yiv8470420125photo-title a, #yiv8470420125 div.yiv8470420125photo-title
>> a:active, #yiv8470420125 div.yiv8470420125photo-title a:hover, #yiv8470420125
>> div.yiv8470420125photo-title a:visited {text-decoration:none;}#yiv8470420125
>> div#yiv8470420125ygrp-mlmsg #yiv8470420125ygrp-msg p a
>> span.yiv8470420125yshortcuts
>> {font-family:Verdana;font-size:10px;font-weight:normal;}#yiv8470420125
>> .yiv8470420125green {color:#628c2a;}#yiv8470420125 .yiv8470420125MsoNormal
>> {margin:0 0 0 0;}#yiv8470420125 o {font-size:0;}#yiv8470420125
>> #yiv8470420125photos div {float:left;width:72px;}#yiv8470420125
>> #yiv8470420125photos div div {border:1px solid
>> #666666;height:62px;overflow:hidden;width:62px;}#yiv8470420125
>> #yiv8470420125photos div label
>> {color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv8470420125
>> #yiv8470420125reco-category {font-size:77%;}#yiv8470420125
>> #yiv8470420125reco-desc {font-size:77%;}#yiv8470420125 .yiv8470420125replbq
>> {margin:4px;}#yiv8470420125 #yiv8470420125ygrp-actbar div a:first-child
>> {margin-right:2px;padding-right:5px;}#yiv8470420125 #yiv8470420125ygrp-mlmsg
>> {font-size:13px;font-family:Arial, helvetica, clean,
>> sans-serif;}#yiv8470420125 #yiv8470420125ygrp-mlmsg table
>> {font-size:inherit;font:100%;}#yiv8470420125 #yiv8470420125ygrp-mlmsg select,
>> #yiv8470420125 input, #yiv8470420125 textarea {font:99% Arial, Helvetica,
>> clean, sans-serif;}#yiv8470420125 #yiv8470420125ygrp-mlmsg pre, #yiv8470420125
>> code {font:115% monospace;}#yiv8470420125 #yiv8470420125ygrp-mlmsg *
>> {line-height:1.22em;}#yiv8470420125 #yiv8470420125ygrp-mlmsg
>> #yiv8470420125logo {padding-bottom:10px;}#yiv8470420125 #yiv8470420125ygrp-msg
>> p a {font-family:Verdana;}#yiv8470420125 #yiv8470420125ygrp-msg
>> p#yiv8470420125attach-count span
>> {color:#1E66AE;font-weight:700;}#yiv8470420125 #yiv8470420125ygrp-reco
>> #yiv8470420125reco-head {color:#ff7900;font-weight:700;}#yiv8470420125
>> #yiv8470420125ygrp-reco {margin-bottom:20px;padding:0px;}#yiv8470420125
>> #yiv8470420125ygrp-sponsor #yiv8470420125ov li a
>> {font-size:130%;text-decoration:none;}#yiv8470420125
>> #yiv8470420125ygrp-sponsor #yiv8470420125ov li
>> {font-size:77%;list-style-type:square;padding:6px 0;}#yiv8470420125
>> #yiv8470420125ygrp-sponsor #yiv8470420125ov ul {margin:0;padding:0 0 0
>> 8px;}#yiv8470420125 #yiv8470420125ygrp-text
>> {font-family:Georgia;}#yiv8470420125 #yiv8470420125ygrp-text p {margin:0 0 1em
>> 0;}#yiv8470420125 #yiv8470420125ygrp-text tt {font-size:120%;}#yiv8470420125
>> #yiv8470420125ygrp-vital ul li:last-child {border-right:none
>> !important;}#yiv8470420125
>>
>>
>
> #yiv3969914750 #yiv3969914750 -- #yiv3969914750ygrp-mkp {border:1px solid
> #d8d8d8;font-family:Arial;margin:10px 0;padding:0 10px;}#yiv3969914750
> #yiv3969914750ygrp-mkp hr {border:1px solid #d8d8d8;}#yiv3969914750
> #yiv3969914750ygrp-mkp #yiv3969914750hd
> {color:#628c2a;font-size:85%;font-weight:700;line-height:122%;margin:10px
> 0;}#yiv3969914750 #yiv3969914750ygrp-mkp #yiv3969914750ads
> {margin-bottom:10px;}#yiv3969914750 #yiv3969914750ygrp-mkp .yiv3969914750ad
> {padding:0 0;}#yiv3969914750 #yiv3969914750ygrp-mkp .yiv3969914750ad p
> {margin:0;}#yiv3969914750 #yiv3969914750ygrp-mkp .yiv3969914750ad a
> {color:#0000ff;text-decoration:none;}#yiv3969914750 #yiv3969914750ygrp-sponsor
> #yiv3969914750ygrp-lc {font-family:Arial;}#yiv3969914750
> #yiv3969914750ygrp-sponsor #yiv3969914750ygrp-lc #yiv3969914750hd {margin:10px
> 0px;font-weight:700;font-size:78%;line-height:122%;}#yiv3969914750
> #yiv3969914750ygrp-sponsor #yiv3969914750ygrp-lc .yiv3969914750ad
> {margin-bottom:10px;padding:0 0;}#yiv3969914750 #yiv3969914750actions
> {font-family:Verdana;font-size:11px;padding:10px 0;}#yiv3969914750
> #yiv3969914750activity
> {background-color:#e0ecee;float:left;font-family:Verdana;font-size:10px;padding:10px;}#yiv3969914750
> #yiv3969914750activity span {font-weight:700;}#yiv3969914750
> #yiv3969914750activity span:first-child
> {text-transform:uppercase;}#yiv3969914750 #yiv3969914750activity span a
> {color:#5085b6;text-decoration:none;}#yiv3969914750 #yiv3969914750activity
> span span {color:#ff7900;}#yiv3969914750 #yiv3969914750activity span
> .yiv3969914750underline {text-decoration:underline;}#yiv3969914750
> .yiv3969914750attach
> {clear:both;display:table;font-family:Arial;font-size:12px;padding:10px
> 0;width:400px;}#yiv3969914750 .yiv3969914750attach div a
> {text-decoration:none;}#yiv3969914750 .yiv3969914750attach img
> {border:none;padding-right:5px;}#yiv3969914750 .yiv3969914750attach label
> {display:block;margin-bottom:5px;}#yiv3969914750 .yiv3969914750attach label a
> {text-decoration:none;}#yiv3969914750 blockquote {margin:0 0 0
> 4px;}#yiv3969914750 .yiv3969914750bold
> {font-family:Arial;font-size:13px;font-weight:700;}#yiv3969914750
> .yiv3969914750bold a {text-decoration:none;}#yiv3969914750
> dd.yiv3969914750last p a {font-family:Verdana;font-weight:700;}#yiv3969914750
> dd.yiv3969914750last p span
> {margin-right:10px;font-family:Verdana;font-weight:700;}#yiv3969914750
> dd.yiv3969914750last p span.yiv3969914750yshortcuts
> {margin-right:0;}#yiv3969914750 div.yiv3969914750attach-table div div a
> {text-decoration:none;}#yiv3969914750 div.yiv3969914750attach-table
> {width:400px;}#yiv3969914750 div.yiv3969914750file-title a, #yiv3969914750
> div.yiv3969914750file-title a:active, #yiv3969914750
> div.yiv3969914750file-title a:hover, #yiv3969914750
> div.yiv3969914750file-title a:visited {text-decoration:none;}#yiv3969914750
> div.yiv3969914750photo-title a, #yiv3969914750 div.yiv3969914750photo-title
> a:active, #yiv3969914750 div.yiv3969914750photo-title a:hover, #yiv3969914750
> div.yiv3969914750photo-title a:visited {text-decoration:none;}#yiv3969914750
> div#yiv3969914750ygrp-mlmsg #yiv3969914750ygrp-msg p a
> span.yiv3969914750yshortcuts
> {font-family:Verdana;font-size:10px;font-weight:normal;}#yiv3969914750
> .yiv3969914750green {color:#628c2a;}#yiv3969914750 .yiv3969914750MsoNormal
> {margin:0 0 0 0;}#yiv3969914750 o {font-size:0;}#yiv3969914750
> #yiv3969914750photos div {float:left;width:72px;}#yiv3969914750
> #yiv3969914750photos div div {border:1px solid
> #666666;height:62px;overflow:hidden;width:62px;}#yiv3969914750
> #yiv3969914750photos div label
> {color:#666666;font-size:10px;overflow:hidden;text-align:center;white-space:nowrap;width:64px;}#yiv3969914750
> #yiv3969914750reco-category {font-size:77%;}#yiv3969914750
> #yiv3969914750reco-desc {font-size:77%;}#yiv3969914750 .yiv3969914750replbq
> {margin:4px;}#yiv3969914750 #yiv3969914750ygrp-actbar div a:first-child
> {margin-right:2px;padding-right:5px;}#yiv3969914750 #yiv3969914750ygrp-mlmsg
> {font-size:13px;font-family:Arial, helvetica, clean,
> sans-serif;}#yiv3969914750 #yiv3969914750ygrp-mlmsg table
> {font-size:inherit;font:100%;}#yiv3969914750 #yiv3969914750ygrp-mlmsg select,
> #yiv3969914750 input, #yiv3969914750 textarea {font:99% Arial, Helvetica,
> clean, sans-serif;}#yiv3969914750 #yiv3969914750ygrp-mlmsg pre, #yiv3969914750
> code {font:115% monospace;}#yiv3969914750 #yiv3969914750ygrp-mlmsg *
> {line-height:1.22em;}#yiv3969914750 #yiv3969914750ygrp-mlmsg
> #yiv3969914750logo {padding-bottom:10px;}#yiv3969914750 #yiv3969914750ygrp-msg
> p a {font-family:Verdana;}#yiv3969914750 #yiv3969914750ygrp-msg
> p#yiv3969914750attach-count span
> {color:#1E66AE;font-weight:700;}#yiv3969914750 #yiv3969914750ygrp-reco
> #yiv3969914750reco-head {color:#ff7900;font-weight:700;}#yiv3969914750
> #yiv3969914750ygrp-reco {margin-bottom:20px;padding:0px;}#yiv3969914750
> #yiv3969914750ygrp-sponsor #yiv3969914750ov li a
> {font-size:130%;text-decoration:none;}#yiv3969914750
> #yiv3969914750ygrp-sponsor #yiv3969914750ov li
> {font-size:77%;list-style-type:square;padding:6px 0;}#yiv3969914750
> #yiv3969914750ygrp-sponsor #yiv3969914750ov ul {margin:0;padding:0 0 0
> 8px;}#yiv3969914750 #yiv3969914750ygrp-text
> {font-family:Georgia;}#yiv3969914750 #yiv3969914750ygrp-text p {margin:0 0 1em
> 0;}#yiv3969914750 #yiv3969914750ygrp-text tt {font-size:120%;}#yiv3969914750
> #yiv3969914750ygrp-vital ul li:last-child {border-right:none
> !important;}#yiv3969914750
>
>