Subject | RE: [firebird-support] Simple query takes too much time |
---|---|
Author | Leyne, Sean |
Post date | 2015-07-29T17:07:41Z |
Jorge:
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.
Sean
> Using MSAccess, a single query to this table takes an average of 14 ms.You think *14ms* is slow?!?!?!?
> SELECT "GTIN" ,"ACTIVO" FROM "TRAZABILIDAD_MEDICAMENTOS" WHERESince 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.
> ("GTIN"
> = ?)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> ^^^^^^^^^^^^^^^^^^^^^
> PLAN (TRAZABILIDAD_MEDICAMENTOS INDEX
> (PK_TRAZABILIDAD_MEDICAMENTOS))
>
> param0 = bigint, "7795312000796"
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.
Sean