Subject | Re: Insertion speed |
---|---|
Author | Svein Erling Tysvær |
Post date | 2005-02-11T09:09:21Z |
--- In firebird-support@yahoogroups.com, "Todd Pinel" wrote:
that issue_no is far less selective than buyer_no (hopefully, you sell
100000 copies of each issue ;o), try changing one line to
AND IM.ISSUE_NO+0 = :ISSUE_NO
and you should observe a - hopefully dramatic - improvement (except
for issues being sold to a handful of buyers).
HTH,
Set
> SELECT BP.BUYER_NOHmm, that looks pretty OK!
> FROM BUYERPUBLICATION BP
> WHERE BP.PUBLICATION_NO = :PUBLICATION_NO
> AND NOT EXISTS(SELECT IM.BUYER_NO
> FROM ISSUESMAILED IM
> WHERE IM.BUYER_NO = BP.BUYER_NO
> AND IM.ISSUE_NO = :ISSUE_NO)
> PLAN (IM INDEX (INTEG_132,INTEG_177)) PLAN (BP INDEXOuch, I dislike using indexes for both buyer_no and issue_no. Assuming
> (FK_BUYERPUBLICATIONPUBLICAT))
that issue_no is far less selective than buyer_no (hopefully, you sell
100000 copies of each issue ;o), try changing one line to
AND IM.ISSUE_NO+0 = :ISSUE_NO
and you should observe a - hopefully dramatic - improvement (except
for issues being sold to a handful of buyers).
HTH,
Set