Subject | Re: [firebird-support] Simple query takes too much time |
---|---|
Author | Jorge Andrés Brugger |
Post date | 2015-07-29T19:19:47Z |
El 29/07/2015 02:07 p.m., 'Leyne, Sean' Sean@...
[firebird-support] escribió:
think it´s slow
Note that the timing es for each record (14 ms x 7100 records: 99400 ms,
i.e., 99 seconds)
I´m trying to figure why in similar scenario *this* table has slow access.
Jorge Andrés Brugger
Departamento de 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
"El verdadero modo de no saber nada es aprenderlo todo a la vez." (George Sand)
--
Antes de imprimir este mensaje, piense si es verdaderamente necesario hacerlo.
[firebird-support] escribió:
> Jorge:When a similar query over a table with 100000 records takes 1 ms, yes, I
>
>> Using MSAccess, a single query to this table takes an average of 14 ms.
> You think *14ms* is slow?!?!?!?
think it´s slow
Note that the timing es for each record (14 ms x 7100 records: 99400 ms,
i.e., 99 seconds)
>> SELECT "GTIN" ,"ACTIVO" FROM "TRAZABILIDAD_MEDICAMENTOS" WHEREMaybe, but even using Access other tables are fast!
>> ("GTIN"
>> = ?)
>> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> ^^^^^^^^^^^^^^^^^^^^^
>> PLAN (TRAZABILIDAD_MEDICAMENTOS INDEX
>> (PK_TRAZABILIDAD_MEDICAMENTOS))
>>
>> param0 = bigint, "7795312000796"
> Since you are using MS Access your query has not been prepared (ie. compiled), which is likely where most of the "query" time is going to.
>
> The engine must prepare statement for execution. Some tools/language allow for statements to be prepared once and then executed with the necessary parameters, which is a significantly faster access pattern when you are executing the same query over and over again.
I´m trying to figure why in similar scenario *this* table has slow access.
>--
> Sean
>
>
> ------------------------------------
> Posted by: "Leyne, Sean" <Sean@...>
> ------------------------------------
>
Jorge Andrés Brugger
Departamento de 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
"El verdadero modo de no saber nada es aprenderlo todo a la vez." (George Sand)
--
Antes de imprimir este mensaje, piense si es verdaderamente necesario hacerlo.