Re: [firebird-support] Execution speed with update query

2016-01-07 Thread Sonya Blade sonyablade2...@hotmail.com [firebird-support]
@Set 
>The above query cannot possibly use any index for the nodes table (well,
>I'm a bit uncertain about indexes defined with COMPUTED BY, but I doubt

Yes the query was not using the indices even if they are defined, 
lately I learned from SO  that indices are not used with expressions. An the 
malfunctioning 
function was abs, It directly affects the execution speed, it was never been 
supossed to be 
used,  another workaround works much better 


@Sean
>How many rows are in table "nodes"?
6677 

>What is the relationship between elements and nodes?

Both tables have only XI, YI, ZI fields in common.   


>What is the PLAN for the statement?

I didn't setup any plan for that, literally I really don't know how to.


> Exeucuted Query:
> update elements E set E.END_I = (select n.node_num from nodes N '+
> 'where abs(E.X_I -N.XI)<0.001 and abs(E.Y_I - N.YI)<0.001 and abs(E.Z_I-
> N.ZI)<0.001 )

>I don't see any FK in use between elements and nodes, so a NATURAL scan of 
>nodes is required for each element row. This naturally will be slow.

Do I need to provide FK?

> 
> The result of Flamerobin is as follow:
> Executing...
> Done.
> 78935476 fetches, 15862 marks, 411 reads, 1 writes.
>The fact that the ratio of reads vs. fetches is so low is a very good thing, 
>it shows that cache is being very actively used. Otherwise, your >query 
>performance would be much worse.
>Sean

I really don't know how to interpret those values but at the first glance, 
fetch values are intimidating.

Regards,





++

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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



RE: [firebird-support] Need Support to connect to the database

2016-01-07 Thread 'Zoran' zoran...@gmail.com [firebird-support]
Hi Jianbo

 

Once I had the same error message and it turned out that my x32 program was 
using x64 fbclient.dll because it was first in the path (x32 fbclient.dll was 
further down the path). After I fixed that, all was ok. Sorry, no other ideas… 
:(

 

Zoran

 

From: firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com] 
Sent: Thursday, January 7, 2016 8:54 PM
To: firebird-support@yahoogroups.com
Subject: Re: [firebird-support] Need Support to connect to the database

 

  

Hi Zoran,

Thanks for you reply,

I have checked the fbclient.dll file, it is x32 and my OS is windows 7 x32.

Do you have any other ideas on this problem?

Thanks,

Jianbo

At 2016/1/7 21:31, 'Zoran' zoran...@gmail.com   
[firebird-support]:

  

Check if fbclient.dll is has the right bitness (x32 or x64).

 

 

From:   
firebird-support@yahoogroups.com [  
mailto:firebird-support@yahoogroups.com] 
Sent: Wednesday, January 6, 2016 8:50 PM
To:   firebird-support@yahoogroups.com
Cc: Rees Theo   

Subject: [firebird-support] Need Support to connect to the database

 

  

 

Hi,

I'm working on a project that need to connect to the database file, but I got 
an error message,

"Statement failed, SQLCODE = -902
Your user name and password are not defined. Ask your database administrator to 
set up a Firebird login."

The database file is used in an application named GP Complete, I have asked the 
owner, he told me that I may need to ask support from Firebird, he didn't 
change the default password "sysdba/masterkey".

Could anyone let me know how can I connect to the database file?

Thanks

 

 





[Non-text portions of this message have been removed]



Re: [firebird-support] Need Support to connect to the database

2016-01-07 Thread Jianbo Li l...@stunningtech.com [firebird-support]

Hi Zoran,

Thanks for you reply,

I have checked the fbclient.dll file, it is x32 and my OS is windows 7 x32.

Do you have any other ideas on this problem?

Thanks,

Jianbo

At 2016/1/7 21:31, 'Zoran' zoran...@gmail.com [firebird-support]:


Check if fbclient.dll is has the right bitness (x32 or x64).

*From:*firebird-support@yahoogroups.com 
[mailto:firebird-support@yahoogroups.com]

*Sent:* Wednesday, January 6, 2016 8:50 PM
*To:* firebird-support@yahoogroups.com
*Cc:* Rees Theo 
*Subject:* [firebird-support] Need Support to connect to the database

Hi,

I'm working on a project that need to connect to the database file, 
but I got an error message,


"*Statement failed, SQLCODE = -902
Your user name and password are not defined. Ask your database 
administrator to set up a Firebird login.*"


The database file is used in an application named GP Complete, I have 
asked the owner, he told me that I may need to ask support from 
Firebird, he didn't change the default password "sysdba/masterkey".


Could anyone let me know how can I connect to the database file?

Thanks






Re: [firebird-support] Execution speed with update query

2016-01-07 Thread setysvar setys...@gmail.com [firebird-support]
Den 06.01.2016 14:42, skrev Sonya Blade sonyablade2...@hotmail.com 
[firebird-support]:
> update elements E set E.END_I = (select n.node_num from nodes N
> where abs(E.X_I -N.XI)<0.001 and abs(E.Y_I - N.YI)<0.001 and 
> abs(E.Z_I-N.ZI)<0.001 )
The above query cannot possibly use any index for the nodes table (well, 
I'm a bit uncertain about indexes defined with COMPUTED BY, but I doubt 
they can involve fields of several tables). Try changing to:

update elements E set E.END_I = (select n.node_num from nodes N
  where N.XI between E.X_I - 0.001 and E.X_I + 
0.001
and N.YI between E.Y_I - 0.001 and E.Y_I + 
0.001
and N.ZI between E.Z_I - 0.001 and E.Z_I + 
0.001 )

If you have indexes for N.XI, N.YI and/or N.ZI and the nodes table 
contain a not too small number of records, you may observe a significant 
performance improvement.

HTH,
Set






++

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

<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/

<*> Your email settings:
Individual Email | Traditional

<*> To change settings online go to:
http://groups.yahoo.com/group/firebird-support/join
(Yahoo! ID required)

<*> To change settings via email:
firebird-support-dig...@yahoogroups.com 
firebird-support-fullfeatu...@yahoogroups.com

<*> To unsubscribe from this group, send an email to:
firebird-support-unsubscr...@yahoogroups.com

<*> Your use of Yahoo Groups is subject to:
https://info.yahoo.com/legal/us/yahoo/utos/terms/



[firebird-support] Age as a string and it\'s parts as integer

2016-01-07 Thread Köditz, Martin martin.koed...@it-syn.de [firebird-support]
Hi Bhavbhuti,

please have a look at Firebird's EXTRACT functions.

e.g.
select extract(year from CAST('1990-01-01' as Date)) from RDB$DATABASE;

returns 1990. Hope this helps.

Regards
Martin