Subject Re: Self-Joined Items Master and transactions stock ledger
Author Bhavbhuti Nathwani
Yes, the TRIM() is gone. I had just copy pasted and edited your original but forgot to remove the TRIM(). Currently, there should not be many jobs running concurrently and as jobs get completed those records are removed, even when the number of users increase the number of records at any given moment will be low in the gttItemsSelected table. I will put in a note in the code nevertheless and if there are performance issues the first thing I will do is create the index.

Thanks a million for sorting this thing out for me and I am still reeling from the beauty of recursive CTE and it's implications of reporting ease.

Kindest regards
Bhavbhuti

--- In firebird-support@yahoogroups.com, Svein Erling Tysvaer <svein.erling.tysvaer@...> wrote:
>
> As long as this is an inner join, these two should be identical,
> Bhavbhuti. The one thing maybe worth considering, is to remove TRIM and
> add an index for gttItemsSelected.JobID, but that is only worth it if
> there are quite a few jobs in gttItemsSelected.