Re: [firebird-support] Fwd: query refuses to die
Does anyone else have any ideas? On 22 July 2013 13:44, Nick Upson n...@telensa.com wrote: Hi, Deleting the attachment from MON$ATTACHMENTS is not permitted in 2.1.5 SQL delete from MON$ATTACHMENTS where MON$ATTACHMENT_ID = 6184945; Statement failed, SQLCODE = -817 operation not supported On 18 July 2013 15:00, Mark Rotteveel m...@lawinegevaar.nl wrote: ** On Thu, 18 Jul 2013 14:47:40 +0100, Nick Upson n...@telensa.com wrote: Hi Steve, that's what I did in the end but I would really like to know why removing the row didn't work It looks like http://tracker.firebirdsql.org/browse/CORE-3977 which will be fixed in 2.5.3 Deleting the attachment from MON$ATTACHMENTS should work according to that issue. Mark -- Nick Upson, Telensa Ltd -- Nick Upson, Telensa Ltd [Non-text portions of this message have been removed] ++ Visit http://www.firebirdsql.org and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com ++ 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: http://docs.yahoo.com/info/terms/
RE: [firebird-support] Query optimization help
Just remove any view you use in your statement and try again. Fb is very slow when resolving queryes that use views joining other tables Em 24/07/2013 12:07, Leyne, Sean s...@broadviewsoftware.com escreveu: ** Your query: select * from VIEWABLE_ENROLLMENTS ve join COESTUD cs on ve.STUDENTSEQ=cs.STUDENTSEQ and ve.DOMID=cs.DOMID and ve.DBID=cs.DBID and ve.SHSEQ=cs.SHSEQ where ve.USER_ID=1 and cs.COESEQ+0=5000 results in plan: PLAN JOIN (JOIN (SORT (JOIN (JOIN (VE VF U INDEX (USERS_), VE VF AR INDEX (AGNTROLE_, AGNTROLE_), VE VF ACT INDEX (ACTION__, ACTION__)), VE VF F NATURAL)) PLAN SORT (JOIN (SORT (JOIN (JOIN (VE VF AL U INDEX (USERS_), VE VF AL AR INDEX (AGNTROLE_, AGNTROLE_), VE VF AL ACT INDEX (ACTION__, ACTION__)), VE VF AL D NATURAL)), VE VF F INDEX (FACILITY_DISTRICTCODE))), VE H INDEX (SCHLHIST_FACILITYID), CS INDEX (COESTUD_SHSEQINDEX))) and increases runtime by about 30% from about 1.5s to 2s. Does that give you any clues about what to try next? Thanks for your effort! 1- Please do not top post/reply. 2 - I think that you may need to create an SP to optimize any further. Your views of Views with several Views using the common AGNTROLE and ACTION_ tables between them and then the DISTINCTs and UNIONs make it difficult to see the forest for the trees for humans and the FB optimizer. Sean [Non-text portions of this message have been removed] ++ Visit http://www.firebirdsql.org and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com ++ 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: http://docs.yahoo.com/info/terms/
[firebird-support] Re: gds32 cohexistance of different firebird installations
--- In firebird-support@yahoogroups.com, Leyne, Sean Sean@... wrote: GDS32.dll is the legacy DLL name which was used by Interbase. The correct Firebird DLL name is FBClient.dll, you should be using this DLL for best compatibility (not all versions of the Interbase GDS32.dll will work with all Firebird releases). Sean Thanks for your answer. I know this, but I have some old programs build in delphi 2 with BDE.. so I can't use fbclient.dll. I have this problem only on my develop workstation, where I need to change the running FB version many times a day... Is it possible to set something (a registry key, a config file, some other trick) to tell windows where to look for this dll? Is it possible to move this dll to an other folder removing it from windows\system\ without malfunctions? Thank's Martin
Re: [firebird-support] Re: gds32 cohexistance of different firebird installations
Martin, which version of BDE? If you did not do too many native driver specific things, you can change the alias to use ODBC instead of the native Interbase topology. I know many cases where this works very fine. I can personally confirm this works with ODBC driver 2.00.1.152 on Firebird 1.5.x servers, and I know some people who changed from native Interbase to Firebird 2.1 and 2.5 without problems. Maybe it is worth a try? Along with each and every ODBC DSN you could use a separate copy of fbclient.dll. Thanks for your answer. I know this, but I have some old programs build in delphi 2 with BDE.. so I can't use fbclient.dll. I have this problem only on my develop workstation, where I need to change the running FB version many times a day... Is it possible to set something (a registry key, a config file, some other trick) to tell windows where to look for this dll? Is it possible to move this dll to an other folder removing it from windows\system\ without malfunctions? Thank's Martin ++ Visit http://www.firebirdsql.org and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com ++ Yahoo! Groups Links mit freundlichen Grüßen, André Knappstein EDV und Controlling ~~ beta Eigenheim- und Grundstücksverwertungsgesellschaft mbH Hafenweg 4 59192 Bergkamen-Rünthe Telefon: +49 2389 9240 140 Telefax: +49 2389 9240 150 e-mail: knappst...@beta-eigenheim.de Amtsgericht Hamm Nr. B 420 Geschäftsführer: Achim Krähling, Dirk Salewski und Matthias Steinhaus USt-IDNr.: DE 125215402
Re: [firebird-support] Query optimization help
Hi ! Em 25/7/2013 07:54, fabianoas...@gmail.com escreveu: Just remove any view you use in your statement and try again. Fb is very slow when resolving queryes that use views joining other tables Can you give a real life example of that I had never find such a situation... see you !
Re: [firebird-support] Query optimization help
On Thu, Jul 25, 2013 at 8:03 AM, Alexandre Benson Smith ibl...@thorsoftware.com.br wrote: Em 25/7/2013 07:54, fabianoas...@gmail.com escreveu: Just remove any view you use in your statement and try again. Fb is very slow when resolving queryes that use views joining other tables Can you give a real life example of that Alexandre, if my situation qualifies as a real life example I'd be happy to send you a development database to look at. Contact me directly. kd [Non-text portions of this message have been removed]
Re: [firebird-support] Query optimization help
You can send me a copy too. I will try to help you. Em 25/07/2013 10:57, Kevin Donn kd...@msedd.com escreveu: ** On Thu, Jul 25, 2013 at 8:03 AM, Alexandre Benson Smith ibl...@thorsoftware.com.br wrote: Em 25/7/2013 07:54, fabianoas...@gmail.com escreveu: Just remove any view you use in your statement and try again. Fb is very slow when resolving queryes that use views joining other tables Can you give a real life example of that Alexandre, if my situation qualifies as a real life example I'd be happy to send you a development database to look at. Contact me directly. kd [Non-text portions of this message have been removed] [Non-text portions of this message have been removed] ++ Visit http://www.firebirdsql.org and click the Resources item on the main (top) menu. Try Knowledgebase and FAQ links ! Also search the knowledgebases at http://www.ibphoenix.com ++ 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: http://docs.yahoo.com/info/terms/
Re: [firebird-support] Query optimization help
Em 25/7/2013 10:53, Kevin Donn escreveu: On Thu, Jul 25, 2013 at 8:03 AM, Alexandre Benson Smith ibl...@thorsoftware.com.br wrote: Em 25/7/2013 07:54, fabianoas...@gmail.com escreveu: Just remove any view you use in your statement and try again. Fb is very slow when resolving queryes that use views joining other tables Can you give a real life example of that Alexandre, if my situation qualifies as a real life example I'd be happy to send you a development database to look at. Contact me directly. kd The fact that your query is slow using views doent mean that it will be fast without the views It could be possible that your query will be fastar if you use direct tables, but if you just translate the views into a single select, I don't think it will be any faster I completely rewrite of it using tables is another thing see you !
[firebird-support] Number list without table
Hi I need to get list of number (f.e 1,2,3,4,5) as rows but using only SQL query (without extra table or view). Something what after running query looks like: List_of_numbers --- 1 2 3 4 5 Any ideas?? Piotr [Non-text portions of this message have been removed]
RE: [firebird-support] Number list without table
Piotr I need to get list of number (f.e 1,2,3,4,5) as rows but using only SQL query (without extra table or view). Something what after running query looks like: List_of_numbers --- 1 2 3 4 5 Any ideas?? EXECUTE BLOCK ( StartNumber Integer, EndNumber Integer ) RETURNS ( List_of_Numbers Integer ) AS BEGIN List_of_Numbers = StartNumber; WHILE (List_Of_Numbers = EndNumber) DO BEGIN Suspend; List_Of_Numbers = List_Of_Numbers + 1; END END
Re: [firebird-support] Number list without table
Hi Piotr, I need to get list of number (f.e 1,2,3,4,5) as rows but using only SQL query (without extra table or view). Something what after running query looks like: List_of_numbers --- 1 2 3 4 5 You can write a selectable stored procedure to achieve that, with the number of rows as a parameter. Or use EXECUTE BLOCK. Cheers, Paul Vinkenoog
Re: [firebird-support] Number list without table
On Thu, Jul 25, 2013 at 8:46 PM, Piotr Olszewski piotr.olszew...@eskrzynka.pl wrote: ** I need to get list of number (f.e 1,2,3,4,5) as rows but using only SQL query (without extra table or view). Hi there, looks like Sean answered faster than me. Here's the documentation for what you want (search the page for Our last example): http://www.firebirdsql.org/refdocs/langrefupd20-execblock.html HTH, Markus [Non-text portions of this message have been removed]
[firebird-support] Primary Key x Unique Key
Hello. When should I use a Unique Key instead of a Index? I know that a Unique Key does not allow duplicated values like a Primary Key, but what more? Is there some advantage using a Unique Key? A Unique Key is the same that Alternate Key? -- Atenciosamente, Hugo Eyng
Re: [firebird-support] Primary Key x Unique Key
Hallo Hugo, When should I use a Unique Key instead of a Index? I know that a Unique Key does not allow duplicated values like a Primary Key, but what more? That, and it creates an index automatically. Also, if you want a column to be referenced by a foreign key, it has to be either the PRIMARY KEY or UNIQUE. Kind regards, Paul Vinkenoog
Re: [firebird-support] Primary Key x Unique Key
Hallo Hugo, When should I use a Unique Key instead of a Index? I know that a Unique Key does not allow duplicated values like a Primary Key, but what more? That, and it creates an index automatically. Also, if you want a column to be referenced by a foreign key, it has to be either the PRIMARY KEY or UNIQUE. Notice that since Firebird 1.5, a unique key constraint does allow multiple null instances in the column. http://www.firebirdsql.org/file/documentation/reference_manuals/reference_material/html/langrefupd25-ddl-table.html#langrefupd25-ct-unique-keys Cheers, Paul Vinkenoog