Re: [firebird-support] How to save a parent-child relation?

2011-08-26 Thread unordained
-- Original Message --- From: W O > Yes, because a parent without a child has not sense in my application. > So, I want to avoid that possibility. > Walter. > > On Sat, Aug 20, 2011 at 10:29 AM, Ann Harrison wrote: > > OK, let me try to restate that. The foeeign key constraint requ

[firebird-support] BLR vs. ODS

2011-09-09 Thread unordained
On my dev server, I thought I'd try out 2.5.1rc1, without doing a full backup/ restore from my current database, which has been running in 2.1.4 for a while. I ran across some issues with Flamerobin / IBPP Logic exception (I've reported it) and decided for the time being to rollback to 2.1.4. B

Re: [firebird-support] BLR vs. ODS

2011-09-12 Thread unordained
-- Original Message --- From: "unordained" To: firebird-support@yahoogroups.com Sent: Fri, 9 Sep 2011 21:52:49 -0500 Subject: [firebird-support] BLR vs. ODS > On my dev server, I thought I'd try out 2.5.1rc1, without doing a full > backup/ restore from my cu

[firebird-support] order of events in cascading foreign keys, triggers, position

2011-11-18 Thread unordained
http://pseudotheos.com/view_object.php?object_id=1619 Maybe this is documented in Helen's book (or elsewhere?) but I haven't seen a flow diagram yet of the exact order in which cascade rules and regular triggers are fired. So I reverse-engineered most of it by running test scripts, but I came

Re: [firebird-support] Index usage in update statement

2012-02-10 Thread unordained
-- Original Message --- From: Marcin Bury > TABLE_A > ID_A - primary key > FIELD_A - some field > > TABLE_B > ID_B - primary key > ID_A - reference to TABLE_A - indexed > FIELD_B - some field - also indexed > > UPDATE TABLE_A > SET FIELD_A = some_value > WHERE ID_A IN (SELECT ID_

Re: [firebird-support] Why when i create a Primary Key that is also a foreign key 2 index are created ?

2012-02-14 Thread unordained
-- Original Message --- From: "nathanelrick" > Why when i create a Primary Key that is also a foreign key 2 index are > created ? or i make a mistake somewhere ? --- End of Original Message --- http://www.firebirdsql.org/refdocs/langrefupd20-create-table.html#langrefupd20

Re: [firebird-support] Firebird and sharding ?

2012-03-28 Thread unordained
-- Original Message --- From: "nathanelrick" > Is it possible via the api to shard a database ? I mean to split the > database in several database (this we do manually), and call the SQL > in parallele on each database and aggregate the data at the end (this > throught the api)

RE: [firebird-support] No index used for join on 'starting with'

2012-04-10 Thread unordained
-- Original Message --- From: "Rick Debay" > Damn. Anyone know why the heck FB won't use an index in a join with > 'starting with'? FWIW, I ran the natural part of the query to generate > a bunch of "starting with 'xyx' or" and appended them to query the > other table. Luckily

Re: [firebird-support] Re: No index used for join on 'starting with'

2012-04-11 Thread unordained
-- Original Message --- From: Dmitry Yemanov > > select 1 from bt_dchronexpl inner join bt_ref on bt_ref.file_num = > > bt_dchronexpl.filenumber; > > --> PLAN JOIN (BT_DCHRONEXPL NATURAL, BT_REF INDEX (IX_BT_REF_FILE_NUM_ASC)) > > -- so it CAN use an index, but why not both? just t

Re: [firebird-support] Re: No index used for join on 'starting with'

2012-04-11 Thread unordained
-- Original Message --- From: Ann Harrison > And what part of relational theory allows partial matches on keys. > Ann --- End of Original Message --- H. Codd might disagree with the incomplete normalization of his base tables, but relational theory allows for set-joi

Re: [firebird-support] Re: No index used for join on 'starting with'

2012-04-11 Thread unordained
-- Original Message --- From: Dmitry Yemanov > This is known as a nested loop join. And "restart from the root" costs > just a couple of page reads that are likely to be satisfied using the > cache. Not something really wasteful. > 2) Streams are read in the index order that allo

Re: [firebird-support] How to drop a view only if it exists?

2012-04-11 Thread unordained
-- Original Message --- From: "kokok_kokok" > Using FB 2.5, how can I drop a view only if it exists? > There is something like DROP VIEW IF EXISTS..? --- End of Original Message --- AFAIK, no such syntax. But if you're just looking for something you can generate & throw

Re: [firebird-support] performance question

2012-04-17 Thread unordained
-- Original Message --- From: "Olaf Kluge" > Now I have two ideas. I create a table with all fields (separate for each > information) and an import stored procedure fill this table with information > from the long string. (line_number = substring(:str_in from 1 for 4)) etc. > > S

[firebird-support] FB SS 2.5 SMP - clarification

2012-04-20 Thread unordained
I realize this isn't official, but what I'm looking at is: http:// www.iblogmanager.com/download/misc/articles/fb25_architecture_comparison.pdf For SuperServer, it lists SMP as available as long as the connections are talking to different databases, serialized if same database. This correlates f

Re: [firebird-support] FB SS 2.5 SMP - clarification

2012-04-23 Thread unordained
-- Original Message --- From: Michael Ludwig > How do you measure metadata volume? I mean, when looking at taskmgr or > ps/top/vmstat, how do you know that the memory consumption is due to > metadata and not buffers allocated for this or that? --- End of Original Message --

Re: [firebird-support] Unique foreign key for child tables

2012-05-14 Thread unordained
-- Original Message --- From: "Rick Debay" > I have a parent table with multiple child tables. > Each child row has a foreign key that points to one row in the parent. > Each parent row must have a child row pointing to it. > Each parent row can have only child from any of the chil

Re: [firebird-support] SQL Puzzle: Two Way String Matching

2012-05-14 Thread unordained
-- Original Message --- From: "red_october2009" > I need an SQL statement that will return all records where at least > one human name is found in the pet names field (not the other way > around). In this case the only records that qualify are: --- End of Original Message --

Re: [firebird-support] Table restrictions regarding field count / field type?

2012-06-27 Thread unordained
-- Original Message --- From: "patrick_marten" > are there any restrictions for tables regarding field count and/or > count of fields with a certain datatype? > > For instance: > would it be problematical to have a table with let's say 170 fields, > 40-60 of which are blob field

Re: [firebird-support] "Object in use"

2012-06-29 Thread unordained
-- Original Message --- From: "arda" > I have great difficulty when I need to change a stored procedure or > table structure. I receive "object in use" errors and can't do > anything at day time. I need to wait till about midnight and > disconnect all clients. What could I do if

Re: [firebird-support] Enabling only numbers at field varchar(11)

2012-07-03 Thread unordained
-- Original Message --- From: "Ismael L. Donis Garcia" > As I could validate that an alone field of varchar(11) enabled numbers > and that these had 11 characters of length? --- End of Original Message --- http://www.firebirdsql.org/refdocs/langrefupd25-similar-to.html I

Re: [firebird-support] Is there possibility to return dynamic number of columns from EXECUTE BLOCK /SP?

2012-07-03 Thread unordained
-- Original Message --- From: "un_spoken" > I am pretty sure that is not possible. I've read all info I could get > on the web and it clearly says that output variables /columns must be > defined for stored procedure or execute block. But maybe I am wrong? > > Maybe it is someho

Re: [firebird-support] Re: Is there possibility to return dynamic number of columns from EXECUTE BLOCK /SP?

2012-07-05 Thread unordained
-- Original Message --- From: "un_spoken" > regarding option b) > > > b) if there's more to it, dynamically build up the EXECUTE BLOCK as you did > > above, then execute the whole thing as a statement (keeping in mind that > > you > > need to build up a statement that looks lik

Re: [firebird-support] Re: Query a table within its trigger

2012-07-05 Thread unordained
-- Original Message --- From: "hanszorn2000" > > > I am wondering if there are any known issues with queries within a trigger, when that query accesses the table on which the trigger fires (before insert, so no race condition). > > > I am experiencing unpredictable and even wrong

Re: [firebird-support] Re: Query a table within its trigger

2012-07-05 Thread unordained
-- Original Message --- From: "hanszorn2000" > > > > > > declare LOCATION integer; > > > declare ARTICLEID varchar(20); > > > BEGIN > > > select first 1 NEWLOCATION, ARTICLEID from ARTICLE > > > where ARTICLE.CUSTID = NEW.CUSTID > > > and ARTICLE.ISACTIVE = 'F' >

Re: [firebird-support] one query works, the other never comes back

2012-07-06 Thread unordained
-- Original Message --- From: "brian.matchey" > I have a problem where a select query works on one user's data but not > another's. (Firebird server 2.5.1.26351) Strangely, if I reverse the > join and from statements, the query works for both – why? > > This query fails for one

Re: [firebird-support] How to use a variable to forme a query?

2012-07-12 Thread unordained
-- Original Message --- From: K Z > Is there a way to make something like this: > query="where ID=10 and AGE >20"; > select * from TABLE :query; --- End of Original Message --- create procedure filtered_select (/* parameters, preferably NOT just a text version of your WHE

Re: [firebird-support] How force a failure inside a trigger?

2012-07-12 Thread unordained
-- Original Message --- From: K Z > How can i force a failure of a write operation from inside a TRIGGER? > For example, a TRIGGER for a INSERT INTO operation. Inside the TRIGGER > i will have a IF condition and if necessary, i want to cause a failure, > canceling the INSERT INT

Re: [firebird-support] SELECT statement runs at different speeds

2012-07-12 Thread unordained
-- Original Message --- From: "red_october2009" > I have the following statement: > > SELECT > f.PAR_GUID, > MAX(DATEDIFF(DAY, f.EVT_DT + f.EXP_RSP_DYS, CURRENT_DATE)) > FROM > JET_LTR f > WHERE > (f.EXP_RSP_DYS > -1) AND > (f.RSP_RCVD_DT IS NULL) AND > (DATEDIFF(DAY,

Re: [firebird-support] Re: How to use a variable to forme a query?

2012-07-13 Thread unordained
-- Original Message --- From: "peixinhosdalua" > Is it possible to make a output of the variable this_query to view if > all newly formed variable is correct? Something like a send_to_log() > > send_to_log(this_query); > for execute statement :this_query into :a, :b, :c, ..., :z

Re: [firebird-support] Re: Slow query with like '%xxx%' clause - PROBLEM SOLVED!

2012-07-13 Thread unordained
-- Original Message --- From: "peixinhosdalua" > CREATE VIEW LISTA_CLIENTES_PESQUISA (IDCLIENTES, PESQUISA) > AS > > select c.IDCLIENTES, > cp.DESCRICAO||p.NOME||c.IDCLIENTES||c.CLIENTE||c.MORADA|| c.CP||c.LOCALIDADE|| c.PAIS||c.TELEFONE||c.FAX|| > c.EMAIL|| > c.PER_DESCON

Re: [firebird-support] null row

2012-08-28 Thread unordained
-- Original Message --- From: Mahesh Pratihari > Could you please let me know why I am getting one null row while > executing the query. > > EXECUTE STATEMENT :QRYSTR > INTO > :UID,:NAME,:ATTRIBUTETYPE,:ISSINGLETON,:ISAUTOINHERIT, > :ISINHERIT,:ISCHECK

Re: [firebird-support] Re: Speed up on recalculation procedure

2012-10-11 Thread unordained
-- Original Message --- From: "y_ongky_s" > So the procedure work by deleting old records and then create new > records with insert command. > > The problem is after records deleted from stock card table it create > garbage collection and slow down > the process when the procedure

[firebird-support] after 2.1 to 2.5 migration, nbackup seems to slow operations unusually

2013-07-10 Thread unordained
Last night, we upgraded: SS 32-bit 2.1.5 -> SS 32-bit 2.5.2(sec1), on 64-bit Windows Server 2008 For the most part, things are okay, but when nbackup is running (level-2 backups every hour, takes about 10 minutes), I'm seeing something I haven't historically seen: concurrent queries take enor

Re: [firebird-support] Re: after 2.1 to 2.5 migration, nbackup seems to slow operations unusually

2013-07-11 Thread unordained
-- Original Message --- From: Dmitry Yemanov > Out of curiosity, did you try playing with -D ON/OFF modes for > nbackup? If so, does it make any difference? > > Dmitry --- End of Original Message --- Haven't touched it yet, I can do that this afternoon (gathering data th

Re: [firebird-support] Re: after 2.1 to 2.5 migration, nbackup seems to slow operations unusually

2013-07-11 Thread unordained
-- Original Message --- From: "unordained" To: firebird-support@yahoogroups.com Sent: Thu, 11 Jul 2013 09:51:17 -0500 Subject: Re: [firebird-support] Re: after 2.1 to 2.5 migration, nbackup seems to slow operations unusually > -- Original Message -

Re: [firebird-support] firebird computed field

2013-08-02 Thread unordained
-- Original Message --- From: Wewe > > select * from y > > select value1+value2 as total from y > > Which is better performance and speed? table x or table y ? --- End of Original Message --- I've never noticed a difference in performance at select time. I think the main

RE: [firebird-support] Why IN AUTONOMOUS TRANSACTION doesnt work here?

2013-09-20 Thread unordained
-- Original Message --- From: "Leyne, Sean" > It is as expected, data type constraints are enforced before all other > operations. > What would be the purpose of firing a trigger if the data is not valid? > Sean --- End of Original Message --- Because triggers could fix t

Re: [firebird-support] Database tables how to compare and changed

2013-11-15 Thread unordained
-- Original Message --- From: "Andrew Gable" > I have done a major update to my system database due to new software > development that I have been working on > and I need to now change the live database to have the new tables / columns > etc in it > > IS there a way I can do this

[firebird-support] mon$call_stack, FK cascade

2013-12-05 Thread unordained
Inside some of my triggers, I'm trying to detect if I'm at a top-level user- requested operation, or nested inside other triggers. (I've done this for some REDO triggers before, here I'm doing it for validation reasons -- there are things I don't want a user doing directly, but don't mind cascad