Subject | selects stayed |
---|---|
Author | Virtual Memory |
Post date | 2002-12-03T18:53:54Z |
After converting my BDE's application for IBO some selects stayed much slowwer.
Am I sending select and the properties specified in the component TIBOQuery to see where am being mistaken?
SELECT DISTINCT
P.L010_CODIGO_BASE,
P.L010_CODIGO,
P.L010_CODIGO_SIMILARIDADE,
P.L010_DESCRICAO,
SUM(L.L250_QTD_ATUAL - L.L250_QTD_RESERVA) AS L010_DISPONIVEL
FROM
L010 P
LEFT JOIN L250 L
ON (P.L010_CODIGO = L.L250_L010_CODIGO)
WHERE
(P.L010_CODIGO_BASE LIKE :PRD1 OR
P.L010_CODIGO LIKE :PRD2 OR
P.L010_DESCRICAO LIKE :PRD3) AND
(((L.L250_L305_CODIGO = 'A' ) OR
(L.L250_L305_CODIGO = 'P' AND L.L250_DATA_ENTRADA <= :SEG_VEN AND
L.L250_DATA_ENTRADA > :PRDL) OR
(L.L250_L305_CODIGO IS NULL)) AND (L.L250_QTD_ATUAL >= 0 OR L.L250_QTD_ATUAL IS NULL)) AND
(L.L250_QTD_RESERVA >= 0 OR L.L250_QTD_RESERVA IS NULL)
GROUP BY
P.L010_CODIGO_BASE,
P.L010_CODIGO,
P.L010_CODIGO_SIMILARIDADE,
P.L010_DESCRICAO
Flavio Macedo :.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.423 / Virus Database: 238 - Release Date: 25/11/2002
[Non-text portions of this message have been removed]
Am I sending select and the properties specified in the component TIBOQuery to see where am being mistaken?
SELECT DISTINCT
P.L010_CODIGO_BASE,
P.L010_CODIGO,
P.L010_CODIGO_SIMILARIDADE,
P.L010_DESCRICAO,
SUM(L.L250_QTD_ATUAL - L.L250_QTD_RESERVA) AS L010_DISPONIVEL
FROM
L010 P
LEFT JOIN L250 L
ON (P.L010_CODIGO = L.L250_L010_CODIGO)
WHERE
(P.L010_CODIGO_BASE LIKE :PRD1 OR
P.L010_CODIGO LIKE :PRD2 OR
P.L010_DESCRICAO LIKE :PRD3) AND
(((L.L250_L305_CODIGO = 'A' ) OR
(L.L250_L305_CODIGO = 'P' AND L.L250_DATA_ENTRADA <= :SEG_VEN AND
L.L250_DATA_ENTRADA > :PRDL) OR
(L.L250_L305_CODIGO IS NULL)) AND (L.L250_QTD_ATUAL >= 0 OR L.L250_QTD_ATUAL IS NULL)) AND
(L.L250_QTD_RESERVA >= 0 OR L.L250_QTD_RESERVA IS NULL)
GROUP BY
P.L010_CODIGO_BASE,
P.L010_CODIGO,
P.L010_CODIGO_SIMILARIDADE,
P.L010_DESCRICAO
Flavio Macedo :.
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.423 / Virus Database: 238 - Release Date: 25/11/2002
[Non-text portions of this message have been removed]