Subject | RE: [firebird-support] More indexed reads with FB 2.0 |
---|---|
Author | Leyne, Sean |
Post date | 2006-08-11T22:01:35Z |
Guido,
original example:
"from BACKLOG where BLCSSALESREPID=56 and BLCSGPID3=65..."
Does that explain the difference in the results?
Regarding the overall performance...
Do you have a compound index with includes BLCSSALESREPID and BLCSGPID3
on the BackLog table?
Do you have a compound index with includes CSID, CSUSID1 and CSGPID3 on
the Customer table?
Does adding the indexes improve things?
Sean
> select BLPCID,sum(BLGROSS_SALES),sum(BLRETURNS),sum(BLNETSALES),I noted that you are missing the following criteria which was in your
> sum(BLDELIVERY_QUANTITY),sum(BLBACKLOG)
> from BACKLOG left join TURNOVER_PC_CS on BLPCID=TO6PCID
> join CUSTOMERS on TO6CSID=CSID and CSUSID1=56 and CSGPID3=65
> where TO6PCID is null
> group by BLPCID
>
> but I don't get the right results. Any idea, where the error could be?
original example:
"from BACKLOG where BLCSSALESREPID=56 and BLCSGPID3=65..."
Does that explain the difference in the results?
Regarding the overall performance...
Do you have a compound index with includes BLCSSALESREPID and BLCSGPID3
on the BackLog table?
Do you have a compound index with includes CSID, CSUSID1 and CSGPID3 on
the Customer table?
Does adding the indexes improve things?
Sean