On 5.11.2015 13:25, Dmitry Yemanov dim...@users.sourceforge.net
[firebird-support] wrote:
>
> 05.11.2015 14:12, Josef Kokeš j.ko...@apatykaservis.cz wrote:
> >
> > I wonder: Was there any change in FB 2.5.4 which would slow down
> > processing of WHERE field IN (subselec
On 5.11.2015 19:38, setysvar setys...@gmail.com [firebird-support] wrote:
>
> Den 05.11.2015 12:12, skrev Josef Kokeš j.ko...@apatykaservis.cz
> [firebird-support]:
> > SELECT COUNT(*)
> > FROM a_complex_view
> > WHERE field1=1 AND field2<>2
> >
Hi!
I wonder: Was there any change in FB 2.5.4 which would slow down
processing of WHERE field IN (subselect) a lot, compared to FB 2.5.3? I
have been performing tests because a user of mine complained about slow
speed of my database, and found out that my query in the form of:
SELECT
Hi!
What would be a proper way of dealing with GBAK restore error
'validation error for column X, value *** null ***'? This error
appears in one table, where X is the primary key. The database is
Firebird 2.5.4 in the superserver mode.
1) How do I properly restore this backup? Neither
Hi!
Thanks for the answer. Luckily, I still have the FDB file, so I can get
rid of the bad records easily. What has me concerned is, what if I only
had the backup? Your trick with pumping seems plausible, I will have to
give it a try. IBBackupSurgeon looks promising, too.
Josef
On 15.5.2015
Hi!
I am having trouble with one installation of my application: Whenever I
try to create a table, I receive error 335544351 unsuccessful metadata
update\nrequest depth exceeded. (Recursive definition?). I cannot
figure what could possibly be causing this, as the CREATE TABLE
statement is
On 21.10.2014 20:48, 'Edward Mendez' emendez...@nc.rr.com
[firebird-support] wrote:
Josef,
Not sure if this will be efficient depending on number of rows, but this is
another way without using a TEMP_TABLE.
SELECT gen_data.id, gen_data.name, gen_data.dateandtime, gen_data.value,
Hi!
I tried this approach before, but it violates my only run GET_DATA
once requirement :-(
Josef
On 21.10.2014 21:15, Svein Erling Tysvær
svein.erling.tysv...@kreftregisteret.no [firebird-support] wrote:
What about
FOR WITH TMP(MyDateTime, MySum) as
(SELECT MIN(dateandtime),
On 27.10.2014 10:35, Svein Erling Tysvær
svein.erling.tysv...@kreftregisteret.no [firebird-support] wrote:
Hi!
I tried this approach before, but it violates my only run GET_DATA
once requirement :-(
Well, with EXECUTE BLOCK and ORDER BY it may be possible to satisfy your
MIN
Hi!
Is there a simple way to get an aggregation of some query as well as the
individual rows from within a PSQL? I.e., I have a stored procedure
GEN_DATA which produces individual rows (ID, Name, DateAndTime, Value).
I am processing the output of GEN_DATA in another stored procedure
PROCESS_DATA:
Seems like I will have to use a temporary table for this purpose. But if
there is another way, I would be interested in knowing it.
Josef
Hi!
Is there a simple way to get an aggregation of some query as well as the
individual rows from within a PSQL? I.e., I have a stored procedure
Hi guys,
I have a simple stored procedure to update data, like this :
SET TERM ^ ;
CREATE PROCEDURE REG
AS
BEGIN
UPDATE table a set a.field1 = '123';
exit;
END^
SET TERM ; ^
When I run that procedure on flamerobin with this command:
execute procedure Reg.
It runs
Hi!
I am struggling with a particular select, trying to get it to execute as
efficiently as possible. I have tables MASTER(ID, NAME, ...) and
DETAIL(ID, MASTER_ID, VALUE1, VALUE2, VALUE3). The SELECT I want to get
would display all fields from MASTER and an aggregation of fields from
DETAIL, e.g.
I would consider the this second option, but I would change the join:
SELECT ...
FROM DETAIL
LEFT JOIN MASTER
Check on your real structure and data if it helps
Hi!
Unfortunately, this is not applicable to my case, as I do have MASTERs
which have no DETAIL (yet).
Josef
On 18.4.2014 11:10, Thomas Beckmann wrote:
Hi Josef,
what I figured out to be quite handy, is to write something like:
select
MASTER.*,
cast(left(S, 10) as bigint),
cast(substring(S from 10 for 10) as bigint),
cast(right(S, 10) as bigint),
from (SELECT MASTER.ID,
(SELECT
On 2.4.2014 9:26, Bogdan Mihalache wrote:
Update table set *column = Mod(column+1,2)* where id = :id
UPDATE table SET column=1-column WHERE id=:id
Doesn't need any functions, built-in or UDF.
Josef Kokes
Hello everybody,
we plan a web-Application with a firebird database. Now I have two
options to prepare the data for the web-client (HTML…).
Option A – a view – returns Data from all Users and the client selects
itself
Option B – a stored procedure with input parameters, the client gets
Hi!
For a long time I have been using LEFT JOINs rather than JOINs
everywhere, because of some past experience with Firebird 1.5 that LEFT
JOIN is much faster than JOIN, even if I have to use WHERE
key_of_the_joined_table IS NULL afterwards. Today I encountered a case
where this is the case even
Hello Josef,
I've never had that issue using Firebird, but some time ago I had a
similar behavior with SQL Server and the responsible was a fragmented
index. May be you should take a look to your indexes design or rebuild
them via backup/restore.
Hi!
That should not be the case here, as
On 2.8.2013 13:59, Alexis Diel wrote:
but LEFT JOIN is diferente of JOIN...
- LEFT JOIN brings all the data filtered from the FROM table, and
- JOIN brings only the data that have the ON condition in the JOINED table.
Which should make JOIN faster than LEFT JOIN, if anything, because it
On 18.7.2013 7:08, Josef Kokeš wrote:
Hi!
I realize that the official answer to can I rename an index is no,
and that directly writing to the system tables is generally a poor idea.
But still: How much damage can I cause by UPDATE on RDB$INDEX_NAME in
RDB$INDICES and RDB$INDEX_SEGMENTS? I
On 17.7.2013 13:55, Softtech Support wrote:
Greetings All,
v1.5.3
I need to know how many tables, indicies, functions, stored procedures,
etc are in my Firebird database.
Is there a quick way to determine this?
-- stored procedures
SELECT COUNT(*)
FROM rdb$procedures
WHERE
Hi!
I realize that the official answer to can I rename an index is no,
and that directly writing to the system tables is generally a poor idea.
But still: How much damage can I cause by UPDATE on RDB$INDEX_NAME in
RDB$INDICES and RDB$INDEX_SEGMENTS? I have this itch I would like to
scratch, where
On Thu, 4 Jul 2013 10:34:21 +0200, Olaf Kluge olaf.kl...@satron.de
mailto:olaf.kluge%40satron.de
wrote:
for example there are two variables.
Var1 = 0
Now I would like to negate the Var1 to Var2. If var1 = 0, then should
Var2
=
1 and in the other direction.
Ist it possible Var2 =
Hi!
I wonder, is there a documentation of the various
RDB$TRIGGERS.RDB$TRIGGER_TYPE values somewhere? The Interbase 6
documentation (Language Reference, specifically) lists the values for
the regular BEFORE/AFTER INSERT/UPDATE/DELETE, but I can't find values
for multi-event triggers, e.g.
Hi!
I wonder, is there a documentation of the various
RDB$TRIGGERS.RDB$TRIGGER_TYPE values somewhere? The Interbase 6
documentation (Language Reference, specifically) lists the values for
the regular BEFORE/AFTER INSERT/UPDATE/DELETE, but I can't find values
for multi-event
On 22.3.2013 16:13, Dmitry Yemanov wrote:
22.03.2013 18:44, Josef Kokeš wrote:
I wonder, is there a documentation of the various
RDB$TRIGGERS.RDB$TRIGGER_TYPE values somewhere?
In your Firebird distribution:
/doc/sql.extentions/README.universal_triggers
Or the same file in the SVN
1. Could I install Firebird2 64 bits on a database server and access to
the database from 32 bits web application on another machine?
Yes.
2. What is the process to convert Firebird 1.5 database to Firebird 2
database?
Make a backup on the old (FB1.5) server. Uninstall the old server.
On 7.2.2013 7:04, W O wrote:
Hello everybody
In some articles I saw that people use ZeBeDee for Internet communication
with Firebird, however that product seems discontinued since the year 2005.
Do you know another software similar to ZeBeDee which works well with
Firebird and it's free?
1) Why do you group on something not an output field? I didn't think
that was allowed.
It is. I am not sure if it has any reasonable use, but it is possible.
2) LEFT JOIN followed by referencing to a field in the table being NOT
NULL makes the LEFT JOIN in reality become a (inner) JOIN,
The way I understood it, is each 32 bit process running on 64 bit
windows can access a max of 2 gig each. So if you are running 3 memory
intensive 32 bit applications they each be able to access a max of 2
gig, utilising a total of 6 gig?
Correct.
With my selection of applications, I prefer
On a Windows server with FB 2.1 I want to try using FB 2.5 for some
purposes, so I want to do a side by side install of 2.5. The installer
asks me to stop the existing 2.1 instances, so I suppose it cannot be
done using the installer?
Download the ZIP archive. Then read the file
This raises a couple of questions:
1) Are there any adverse conflicts between IB6.5 and Firebird in a
situation like this ... i.e., would running AT against an IB6.5 engine
ultimately damage the data?
I had some significant issues if I used FB to access an IB database
file. It was imperative
Hi!
I have a database which was never intended to be used by more than one
user, so it never concerned itself with access rights - basically, all
objects were always created by that one user, who thus had a full access
to them.
Now I find myself in need of using another user (because I need
How can I get the folder where FireBird is installed.
I use Delphi and I want to copy the UDF folder after a silent
installation.
Not sure if this is the best method, but I read the DefaultInstance
registry key. It work for me for FB 1.5, 2.1 and 2.5:
RootKey := HKEY_LOCAL_MACHINE;
Hi!
This is a first for me. When creating a new table on one Firebird 2.5
installation, I am getting the following error:
ISC ERROR CODE:335544351
ISC ERROR MESSAGE:
unsuccessful metadata update
request depth exceeded. (Recursive definition?)
Statement: CREATE TABLE v9karty_log (
v9_klic
My aims are (i) establishing a new database on the new computer and (ii)
ensuring that the old records are safely transferred. My first question
is whether Firebird 1.5.6 is compatible to Window 7. In addition, would
Yes. Even Windows x64 are compatible with 32bit Firebird 1.5.6.
Josef
Hi!
Are there some known issues between Firebird 2.5 (SuperServer, default
install) and Windows Firewall (from WinXP)? Today is the second time I
encountered some serious slowdowns while the XP's firewall was running
which went away when I disabled the firewall - a simple query, which on
Hi!
What could possibly be wrong with the following UDF?
* Function *
type
TBlob = {packed} record
GetSegment: TISC_BlobGetSegment;
BlobHandle: PInt;
SegmentCount: LongInt;
MaxSegmentLength: LongInt;
TotalSize: LongInt;
PutSegment: TISC_BlobPutSegment;
end;
Nice - this will also fail with the same error:
function BLOBLEN(Value: PBlob): Integer; cdecl;
begin
Result := 1;
end;
I admit I find this very mystifying.
Josef
Hi!
What could possibly be wrong with the following UDF?
* Function *
type
TBlob = {packed} record
On 31.7.2012 14:12, Josef Kokeš wrote:
Nice - this will also fail with the same error:
function BLOBLEN(Value: PBlob): Integer; cdecl;
begin
Result := 1;
end;
I admit I find this very mystifying.
Never mind, found it - the problem was not in the function, but in the
SQL declaration
I'm trying to have an existing perl program, that is using the DBI
system for theoretical database interoperability, to use Firebird. I've
discovered that, as a standard, this program executes statements such as,
select * from table where pkey=''
That apparently works with Mysql - doing
Hi!
I have never tried to change Firebird's default settings, because the
server has always been good enough and if it isn't broken, don't fix
it. But I can't help but wonder about some of the settings, because I
don't understand their default values. Specifically, assuming Firebird
2.5 in
The problem is that SuperServer is multi-threaded but not
interlocked, so only one thread runs at a time so it cannot take
advantage of multiple cores. Some operating systems move the process
from one core to another in an attempt to balance load. That degrades
performance, but can be
Hi!
Having bought Delphi XE2, I tried to compile my old (well, very old) UDF
in a 64bit mode. I expected a total fail, because the UDF was written in
Delphi 5 for Interbase 6.0, but after I fixed string types, the UDF
actually works with Firebird 2.1 x64. With one exception - a function
which
The function:
function STRBLOB(Value: PAnsiChar; Dest: PBlob): PBlob;
begin
Result := Dest;
Dest^.PutSegment(Dest^.BlobHandle, Value, StrLen(Value))
end;
That's CDECL, too. I copied it from the implementation rather than from
the interface.
Josef Kokes
Hi!
Hello, Josef!
Monday, June 18, 2012, 10:18:57 AM, you wrote:
JK function STRBLOB(Value: PAnsiChar; Dest: PBlob): PBlob;
cdecl
Yeah, I realized too late that I should have used the declaration from
interface, not from implementation. I have that.
JK The blob record (probably wrong
Hi!
I need to find the date of last database restore. GSTAT -h can print
this information as Creation date. Does anyone know how can I get this
information programatically?
Thanks,
Pepak
++
On 15.6.2012 9:19, Thomas Steinmaurer wrote:
I need to find the date of last database restore. GSTAT -h can print
this information as Creation date. Does anyone know how can I get this
information programatically?
If monitoring tables are available, it might be easier to query
MON$DATABASE
I need to find the date of last database restore. GSTAT -h can print
this information as Creation date. Does anyone know how can I get this
information programatically?
If monitoring tables are available, it might be easier to query
MON$DATABASE with e.g.:
select mon$creation_date from
Hi!
I feel a bit overwhelmed by user rights in a database in respect to
stored procedures.
I have a database owned by user OWNER. I want to give limited access to
user ATTACKER, so that he can read and write the database through a
stored procedure MODIFY_DATABASE. So I grant:
GRANT EXECUTE
Dne 29.3.2012 18:26, Ann Harrison napsal(a):
2012/3/29 Josef Kokešj.ko...@apatykaservis.cz
Due to hardware malfunction, my database got damaged. GFIX (-v -f -i)
tells me that a database has 1 record level error, 9 data page
errors, 41 index page errors and 322 database page errors.
Hi!
This is a new one for me: I have a Firebird 2.5 database file with
corruption not in records, but in table structures themselves. After I
used GFIX -v -f, GFIX -m and backup/restore, I am left with a
database which basically works, but as soon as I try to access certain
tables, I get an
Hi!
I find myself repeatedly writing code such as
SELECT (a+b)*c AS value1,
some_function((a+b)*c) AS value2,
some_other_function((a+b)*c) AS value 3
FROM ...
Is there any other way to reuse a calculated value by referencing its
alias than through views? E.g.
CREATE VIEW
Dne 25.1.2012 12:17, bennie_coetzer napsal(a):
Hi, I am still battling with FB on another port. I have changed the
firebird.conf file to use port 3051. This seems to work as the port is
actively monitored when FB runs and not when it is stopped.I then used
FlameRobin and created a host
Hi!
I am trying to convert a BLOB (unlimited size, theoretically) to a long
VARCHAR (say, VARCHAR(8192)). This should be easy enough to do:
DECLARE VARIABLE b BLOB; /* input */
DECLARE VARIABLE v VARCHAR(8192); /* output */
...
v = SUBSTRING(b, 1, 8192);
Except that as soon as I convert
Dne 28.12.2011 17:21, Milan Babuskov napsal(a):
Josef Kokeš wrote:
I am trying to convert a BLOB (unlimited size, theoretically) to a long
VARCHAR (say, VARCHAR(8192)). This should be easy enough to do:
DECLARE VARIABLE b BLOB; /* input */
Which subtype of BLOB? IIRC, BLOB subtype 1 (text
I find myself in a situation where I need to delete large amount of data
from a huge (comparably) table, with relatively complex criteria on what
stays and what gets deleted:
- The table in question has about 6 million rows.
- The rows contain a mix of integer, timestamp and blob columns,
Hi!
I find myself in a situation where I need to delete large amount of data
from a huge (comparably) table, with relatively complex criteria on what
stays and what gets deleted:
- The table in question has about 6 million rows.
- The rows contain a mix of integer, timestamp and blob columns,
Hi!
Is it possible do declare a stored procedure which would use a
non-existent external function? That is, I can define an external
function using:
declare external function test
returns integer
entry_point 'TEST' module_name 'pepak.dll'
This will succeed even if pepak.dll does not
Hi!
It's been my experience that if I have a stored procedure which returns
rows in a particular order and perform a SELECT on this procedure, the
row order of the SELECT matches that of the procedure. E.g.:
CREATE PROCEDURE test
RETURNS ( value INTEGER )
AS
BEGIN
value = 1;
SUSPEND;
It's been my experience that if I have a stored procedure which returns
rows in a particular order and perform a SELECT on this procedure, the
row order of the SELECT matches that of the procedure. E.g.:
What I would like to know, is this behavior documented or is it just a
random
OK, then we'll need to look for less common problems. When the query
is slow, are you seeing lots of page faults? Process size growth?
What is the rate of reads/writes/marks/fetches? Do you have any guess
as to where the time is going?
Hi Ann,
I am afraid most of the values you are asking me
Hello, this is related to my previous post... I'm trying to write a UDF
in Delphi... It's declared like this:
function Descuentos(var Suma:currency;Descuentos:pchar):double; cdecl;
export;
DECLARE EXTERNAL FUNCTION SG_DES
DOUBLE PRECISION,
CSTRING(50)
RETURNS DOUBLE PRECISION BY VALUE
64 matches
Mail list logo