On Fri, Oct 23, 2015 at 2:40 AM, drci...@yahoo.com [firebird-support] <
firebird-support@yahoogroups.com> wrote:
>
>
> I don't think I understand you fully. Indexed reads a hudreds of times
> faster than non indexed.
>
Yes, when you're looking for a specific value. When you're looking for
Norbert wrote:
>execute block
>returns (reference varchar(10), due double precision, balance double
>precision)
>as
>begin
>balance = 0;
>for select
>reference,due
>from invoices into :reference, :due
>do begin
>balance = balance+due;
>suspend;
>end
>end
Thank you Norbert, that does look like
I did what (I think is what) you need many years ago. I don´t remember
exactly the details, but this is still working. What I did was the
following:
When my application initiates, it checks if there exists a database
named MYAPPLICATIONCONFIGURACION.FDB. If it doesn't exist, it creates
it.
Bhavbhuti,
> My application allows users to create a database and it's entry in
> aliases.conf is created by the application. This essentially is
> fine and works well in Admin mode, as soon as the same is tried to
> be done using the normal non-admin mode I am not able to update aliases.conf
>
Köditz, Martin martin.koed...@it-syn.de [firebird-support] wrote:
> is it possible to restore a database without constraints? Or is there
> another way to do this? I just want do delete each primary key in the db.
Is this on a healthy DB? I'm not sure if -I disables the constraints in
that case.
Hi, you're wrong. Non-indexed reads are faster than indexed reads. However,
indexed reads may reduce the data that needs to be read and with the right
conditions, it can speed up things tremendously. Let's say you have a table
with breast cancer patients. Using an index for gender would slow
>>In Firebird 3 it will be possible with window functions. In Firebird 2.5 I
>>don't know a way in pure SQL.
>>Mark
Great, thanks Mark.
Cool, so I’ll be doing something like this, when Firebird 3 is available:
select emp_no, salary,
sum(salary) over (order by salary) cum_salary,
sum(salary)
Hello Karol, I don't think I understand you fully. Indexed reads a hudreds of
times faster than non indexed. And the table will have millions of records, so
I do need them.
"then this is cheaper to scan table (500 records) then use 400 indexed reads"
What do you mean scan table? How do I do
Hi,
I'd like to add a running total to my result set. For example:
Table: Invoices
Reference Due
Invoice1 50.00
Invoice2 30.00
Invoice3 20.00
I'm guessing SQL would be something like:
Select
Reference,
Due,
Sum_Total(Due) as Balance
>From
This will become simpler with Firebird 3, which implements windowing
functions.
Simple cases can also be possible with older versions and some imagination,
e.g.
with tmp (Reference, SumDue) as
(Select Reference, Sum(Due)
From Invoices
Group by 1)
Select Reference, SumDue, (select sum(SumDue)
Hi,
execute block
returns (reference varchar(10), due double precision, balance double
precision)
as
begin
balance = 0;
for select
reference,due
from invoices into :reference, :due
do begin
balance = balance+due;
suspend;
end
end
Norbert
I've done that. But the keys still exist and I'm not able to delete them while
there are many dependencies. Maybe the only chance is to delete the foreign
keys first and then the primary keys. Or is there a more graceful way?
Regards
Martin
In Firebird 3 it will be possible with window functions. In Firebird 2.5 I
don't know a way in pure SQL.
Mark
- Reply message -
Van: "Maya Opperman m...@omniaccounts.co.za [firebird-support]"
Aan: "firebird-support@yahoogroups.com"
15 matches
Mail list logo