
113 S.W.3d 250 (2003)
LUMBER MUTUAL INSURANCE COMPANY, Plaintiff/Appellant,
v.
RELOAD, INC., and American Lumber Co., Defendants/Respondents.
No. ED 83113.
Missouri Court of Appeals, Eastern District, Division Five.
August 19, 2003.
*251 Donald L. O'Keefe Jr., Brian Donovan Kennedy, Rabbit, Pitzer & Snodgrass Law Firm, St. Louis, MO, for Appellant.
Mark Alan Kinzie, Stinson, Mag & Fizzell Law Firm, St. Louis, MO, for Respondent.
SHERRI B. SULLIVAN, Chief Judge.
Lumber Mutual Insurance Company (Lumber Mutual) appeals from the partial summary judgment entered by the trial court in favor of Reload, Inc. (Reload). Because there is no final, appealable judgment, we dismiss the appeal.
Lumber Mutual issued a commercial general liability insurance policy to Reload. American Lumber Co. (American Lumber) sued Reload in Arizona state court for damage to lumber products Reload was handling in the course of its business. Lumber Mutual refused to defend Reload *252 in the Arizona case. In October 2001, Lumber Mutual filed the underlying declaratory judgment action, which included two counts. In Count I, Lumber Mutual sought a declaration that it had no duty to indemnify Reload against the claims brought by American Lumber in the Arizona case. In Count II, Lumber Mutual sought a declaration that it had no duty to defend Reload against those claims.
Reload filed an answer, which included two counterclaims. In Counterclaim I, Reload sought damages for breach of contract including an amount "adequate to compensate Reload, Inc. for its cost of defense in the underlying Arizona case, [and] for its indemnity of any liability assessed against Reload...." In Counterclaim II, Reload sought a declaration that Lumber Mutual did have a duty to defend and to indemnify Reload in the Arizona case.
Lumber Mutual filed a motion for summary judgment seeking judgment in its favor on both of its counts and on Reload's counterclaims. Reload filed a motion for partial summary judgment, seeking only a judgment declaring Lumber Mutual had a duty to defend it in the Arizona case. Reload asserted that any judgment on Lumber Mutual's duty to indemnify was premature because the facts in the underlying suit were still being determined.
After considering both of the motions and the parties' arguments, the trial court denied Lumber Mutual's motion for summary judgment. The trial court granted Reload's motion for partial summary judgment in part and denied it in part. The trial court concluded that Lumber Mutual had a duty to defend Reload in the Arizona case "whether or not ultimately there exists a duty to indemnify." Lumber Mutual appeals.
Reload has filed a motion to dismiss Lumber Mutual's appeal. Reload contends that the trial court's judgment is an unappealable interlocutory order because it does not resolve all pending claims in the case nor did the trial court certify the judgment for appeal pursuant to Rule 74.01(b).[1] Reload asserts that the trial court only resolved the issue of whether or not Lumber Mutual had a duty to defend Reload and did not resolve whether or not Lumber Mutual had a duty to indemnify Reload. In response, Lumber Mutual argues that the judgment does resolve all pending claims in the case. Lumber Mutual asserts that the trial court's ruling on the issue of a duty to defend Reload implicitly resolved the issue of a duty to indemnify because the basis for its claim that it had no duty to defend Reload is the same basis it has for its claim that it had no duty to indemnify.
An appellate court has jurisdiction only over final judgments that dispose of all parties and issues in the case and leave nothing for future determination. O'Neill v. O'Neill, 864 S.W.2d 7, 8 (Mo. App. E.D.1993). If the trial court does not either resolve all the issues as to all parties or expressly designate "there is no just reason for delay," the appeal must be dismissed. Rule 74.01(b); Fleahman v. Fleahman, 25 S.W.3d 162, 164 (Mo.App. E.D.1999). The final judgment rule is based on the belief that piecemeal appeals are oppressive and costly, and that optimal appellate review is achieved by allowing appeals only after the entire action is resolved in the trial court. Blechle v. Goodyear Tire & Rubber Co., 28 S.W.3d 484, 486 (Mo.App. E.D.2000).
Here, the trial court's partial summary judgment did not resolve all the pending issues in the case, despite Lumber *253 Mutual's argument to the contrary. The judgment explicitly resolves only the issue of whether or not Lumber Mutual has a duty to defend Reload in the Arizona case. The duty to defend is separate from the duty to indemnify. The duty to defend is broader than the duty to indemnify. Lampert v. State Farm Fire and Cas. Co., 85 S.W.3d 90, 93 (Mo.App. E.D.2002). An insurer may have a duty to defend claims falling within the policy even if it may not ultimately be obligated to indemnify the insured. Millers Mut. Ins. Ass'n of Illinois v. Shell Oil Co., 959 S.W.2d 864, 871 (Mo.App. E.D.1997).
Therefore, the trial court's determination that Lumber Mutual has a duty to defend Reload in the Arizona case does not mean that Lumber Mutual will ultimately be obligated to indemnify Reload. The duty to defend is determined by comparing the policy language with the allegations in the complaint. Lampert, 85 S.W.3d at 93. In contrast, the duty to indemnify is determined by the facts as they "are established at trial or as they are finally determined by some other means, for example through summary judgment or settlement." McCormack Baron Management Services, Inc. v. Am. Guarantee & Liab. Ins. Co., 989 S.W.2d 168, 173 (Mo. banc 1999). Therefore, as in McCormack, the trial court cannot know what the facts will be or whether those facts will fall within the policy coverage until those facts are established at trial. Id.
The trial court's order and judgment granting partial summary judgment only rules on Lumber Mutual's duty to defend Reload. It leaves undecided the issue raised of whether or not Lumber Mutual has a duty to indemnify Reload and also makes no ruling on Reload's counterclaim for damages for breach of contract. Because it does not resolve all pending issues in the case, it is not a final, appealable judgment. In addition, the trial court did not certify its judgment for appeal by finding there is no just reason for delay as set forth in Rule 74.01(b).
We grant Reload's motion to dismiss and dismiss the appeal for lack of a final, appealable judgment.
LAWRENCE E. MOONEY and GEORGE W. DRAPER, III, J., concur.
NOTES
[1]  All rule references are to Mo. R. Civ. P.2003, unless otherwise indicated.
