Subject Re: [firebird-support] Optimize this view
Author Jorge Andrés Brugger
Alexandre, SET:
What I need to do is some kind of price list. But I solved it another
way: a selectable SP with a "for select" which does the job quickly (it
uses "where" when views use "group by").
Main bottleneck was the ~10 secs view, in which I was looking for the
max of a sum aggregation. Changed it to "first 1 .. order by" ... and
it´s fast now.

Thanks for your time and interest!!


Alexandre Benson Smith escribió:
> jbrugger wrote:
>
>> This is a "never-ending" view (it just ends my patience :)
>>
>> Plan:
>>
>> All referenced views are pretty fast, except
>> "VW_PRECIOS_UNIT_MAS_DISPENSADOS" which takes ~ 10 secs to complete.
>>
>> Data Tables have 250000 records (Consumos_Farmacia) and 35000 records
>> (Medicamentos)
>>
>> Is there anything I could do to make this view usable?
>>
>>
>
> Hi Jorge !
>
> Hard to tell without viewing the referenced views metadata and the
> underlining tables structure and available indices.
>
>
>> Tell me if you need more info about tables or views involved.
>>
>>
>
> Yes ! We need :-)
>
>
>> Thanks!!!
>>
>>
>
> see you !
>
>
>

--
Jorge Andrés Brugger
Informática
DASU - Obra Social del Personal de la Universidad Nacional de la Patagonia
Comodoro Rivadavia, Chubut, Argentina
Teléfono (0297) 446-4444 int. 103
Correo electrónico: jbrugger@...
Website: www.dasu.com.ar



[Non-text portions of this message have been removed]