Subject | RE: [firebird-support] Query is running slowly for the first time. |
---|---|
Author | Leyne, Sean |
Post date | 2012-10-08T19:05:22Z |
Bruce,
If not, then I would use the following SQL:
SELECT
T.Column1, T.Column2,
STORED_PROC.Column1,STORED_PROC.Column2
FROM (
SELECT
S.UniqueID,
S.Column1,
S.Column2
FROM SomeTable S
WHERE
S.Data BETWEEN '01.07.2012' AND '09.07.2012'
) T
LEFT JOIN STORED_PROC( T.UniqueID) ON 1=1
> I am having problem with the query which is constructed like this:Is S.Data indexed?
>
> SELECT S.Column1, S.Column2, STORED_PROC.Column1,
> STORED_PROC.Column2 FROM TABLE SomeTable S LEFT JOIN
> STORED_PROC(S.UniqueID) ON 1=1 WHERE S.Data >= '01.07.2012' AND S.Data
> <='09.07.2012'
If not, then I would use the following SQL:
SELECT
T.Column1, T.Column2,
STORED_PROC.Column1,STORED_PROC.Column2
FROM (
SELECT
S.UniqueID,
S.Column1,
S.Column2
FROM SomeTable S
WHERE
S.Data BETWEEN '01.07.2012' AND '09.07.2012'
) T
LEFT JOIN STORED_PROC( T.UniqueID) ON 1=1