Subject Re: [firebird-support] How to improve Firebird performance on a large table?
Author Alan J Davies
Without knowing your setup, its difficult to say. You may have 100
fields in each record? In a network environment try to minimise the
amount of network traffic.
So, you should try to refine your select statement by returning only
what you need e.g.
instead of >Select * from table where field_value = 1.
try:
select field_value,field_value1,field_value2,field_value100
from table
where field_value = 1 (and field_value2=2)
order by field_value,field_value2 (aim for more selective index - 2
fields, not just 1)
then even better:
What do you want to do with the returned data? View it? Can you handle
more than 20 records at a time on your screen?
select first 20 field_value,field_value1,field_value2,field_value100
from table
where field_value = 1 (and field_value2=2)
order by field_value,field_value2

Good luck
Alan

Alan J Davies
Aldis


On 04/03/2013 06:18, trskopo wrote:
> Hi all,
>
> I have a table with about 5,000,000 records and it's growing.
>
> I run slq statement like this :
>
> Select * from table where field_value = 1.
>
> Table already indexed on field_value (int type).
>
> On local hardisk, where there is only 1 user and no update/edit/insert
> operation, it took about 1-2 seconds to get the result, but on Local
> Area Network, where there about 20 users attached to that database, lots
> of update/edit/insert operation on this table,it took almost 20 seconds.
>
> Is there any tips / methods to improve performance?
>
> Thanks and regards,
> Anto.
>
>