Subject Re: How to get a good performance
Author Svein Erling Tysvær
--- In firebird-support@yahoogroups.com, "donoteatcarrot" wrote:
> Hi, Thank you.
>
> > What about the performance in FB with your original SELECT MAX...
> > after adding DESC index? And memory usage with FB?
>
> I added both index and desc index to that field, using the command
> below:
>
> CREATE INDEX IX_A ON TABLE_X (field_A);
> CREATE DESC INDEX IX_A_DE ON TABLE_X (field_A);
>
> but seems not worked.
> The execution will still take as long time as before.
> and so is memory usage.

Something is seriously wrong when
SELECT MAX(field_A) as max_A, field_B FROM TABLEX GROUP BY field_B
takes 20 minutes on a table that contains only 500000 records. I did a
comparable query on a table with 670000 records and using no indexes
whatsoever it used a few seconds to return the first row and within
about 10 seconds all rows were returned (I even added a COUNT(*) to
ensure all rows were accessed). The server was Firebird 1.5 running on
- well, I don't know, a decent server, but nothing too fancy. Are you
sure you are telling us the full story?

Set
-I like carrots...