
723 N.W.2d 254 (2006)
In re STATE of Minnesota, Petitioner,
State of Minnesota, Respondent,
v.
Beth Luann HART, Appellant.
No. A05-2066.
Supreme Court of Minnesota.
November 2, 2006.
*256 Mark D. Kelly, Esq., Law Offices of Mark D. Kelly, St. Paul, MN, for Appellant.
Jan Kolb, Esq., Mark J. Herzing, Mille Lacs Asst. County Attorney, Milaca, MN, for Respondent.
Thomas R. Ragatz, Attorney General's Office, Lawrence Hammerling, Deputy State Public Defender, St. Paul, MN, for Amicus.
Heard, considered, and decided by the court en banc.

OPINION
GILDEA, Justice.
This case presents the narrow question of whether, after a district court issues a pretrial order dismissing a criminal complaint "with prejudice" and "in the interests of justice," the state can refile the complaint and obtain a writ of mandamus compelling the district court to make a probable cause determination on the refiled complaint. The court of appeals granted, in part, the state's petition for writ of mandamus and vacated the district court's dismissal order, finding the order to be an abuse of discretion. The court of appeals concluded that the state was free to refile the complaint. Because we conclude that the district court had the authority to dismiss the case in the interests of justice, we reverse the decision of the court of appeals to the extent that it vacated the district court order. We also conclude, however, that the state could refile the complaint, and we affirm the court of appeals' decision to the extent that it ordered the district court to make a probable cause determination on the refiled complaint.
On December 29, 2004, the state filed a complaint charging Beth Luann Hart with four counts of controlled substance crimes in the first degree. The complaint was twice amended and the omnibus hearing was rescheduled at least five times. Ultimately, the omnibus hearing was scheduled for September 16, 2005. The hearing was called at 10:00 a.m. on the morning of September 16. At 10:30 a.m., the prosecutor still had not appeared, and the district court granted Hart's motion to dismiss. The district court signed a form on September 16 indicating that the case was dismissed for "lack of prosecutionwith prejudice."[1]
Later that day, the state refiled the complaint against Hart. On September 19, the district court issued a formal order and memorandum dismissing the complaint "with prejudice."[2] The memorandum indicates that the dismissal was made "in the interests of justice and as a deterrent to continued failures to appear." Additionally, the memorandum notes that the "strong sanction of a dismissal" was appropriate in the case because the prosecutor was "cavalierly absent from the hearing." The district court took no action on the refiled complaint except to write on the face of the document, "complaint denied see K6-04-1473" (which is the case number of the action the district court dismissed on September 16).
On October 19, the state petitioned the court of appeals for a writ of mandamus to require the district court to sign the state's *257 refiled complaint. The court of appeals granted the writ in part and vacated the "September 16 and September 19 dismissal orders." We granted Hart's petition for review, and we now affirm in part and reverse in part.

I.
When there are issues of law, we review the court of appeals' decision to grant a writ of mandamus using a de novo standard. McIntosh v. Davis, 441 N.W.2d 115, 118 (Minn.1989). A writ of mandamus "may be issued to any inferior tribunal * * * to compel the performance of an act which the law specially enjoins as a duty" or "to exercise its judgment or proceed to the discharge of any of its functions." Minn.Stat. § 586.01 (2004).[3] Mandamus, however, is "an extraordinary legal remedy." State v. Pero, 590 N.W.2d 319, 323 (Minn.1999). The writ may not be issued to "control judicial discretion." Minn.Stat. § 586.01.
On review of a decision of the court of appeals, we determine whether each element of the mandamus test is satisfied. McIntosh, 441 N.W.2d at 118. Thus, we ask (a) whether the district court had either a clear and present duty to perform an act or abused its discretion by not performing the act, and (b) whether alternative remedies were available to the party seeking the writ making the issuance of a writ unnecessary. Id. at 119. A writ of mandamus "shall not issue in any case where there is a plain, speedy, and adequate remedy in the ordinary course of law," Minn.Stat. § 586.02 (2004), and we have said that when a party has a right to appeal, a writ of mandamus is ordinarily not available, see State v. Wilson, 632 N.W.2d 225, 227 n. 4 (Minn.2001).

A.
Because the existence of an adequate legal remedy precludes a party's ability to seek a writ of mandamus, we first address whether the state had a right to appeal the district court's dismissal of the complaint. A prosecuting attorney may appeal "from any pretrial order of the trial court, including probable cause dismissal orders based on questions of law. However, an order is not appealable * * * if it is an order dismissing a complaint [in the furtherance of justice] pursuant to Minn.Stat. § 631.21 * * *."[4] Minn. R.Crim. P. 28.04, subd. 1(1).
Hart argues that the district court's order was appealable. Hart notes that the court can dismiss a case for unnecessary delay by the prosecution under Minn. R.Crim. P. 30.02, and that dismissals under this rule are appealable.[5] The district court's order, however, did not make any reference to this rule or to an "unnecessary delay." The order indicates that the complaint was dismissed "with prejudice." We have said that this phrase "is inconsequential" when used, as in this case, before jeopardy has attached. City of St. Paul v. Hurd, 299 Minn. 51, 55-56, 216 N.W.2d *258 259, 262 (1974).[6] We look instead to the "basis of the dismissal" to determine whether the state could appeal. See City of St. Paul v. Halvorson, 301 Minn. 48, 51, 221 N.W.2d 535, 537 (1974). The district court's memorandum explained that it dismissed the case "in the interests of justice." A dismissal in the "interests of justice" is not appealable under our case law or under Minn. R.Crim. P. 28.04.[7]
Rather than appeal, our case law dictates that the state's remedy, when a complaint has been dismissed "in the interests of justice," is to refile the complaint. See, e.g., State v. Streiff, 673 N.W.2d 831, 838 (Minn.2004) ("[A Minn.Stat. § 631.21] dismissal ordinarily [does not preclude] the prosecutor from recharging the accused. * * * `While dismissing the complaint under section 631.21 might have avoided the need for a stay of adjudication, the prosecutor would have been free to reinstate identical criminal charges against [the defendant].'" (quoting State v. Krotzer, 548 N.W.2d 252, 255 (Minn.1996))); State v. Fleck, 269 N.W.2d 736, 737 (Minn.1978) (holding that when a case is dismissed in the furtherance of justice, "[t]he state's remedy is not an appeal but to either reissue the amended complaint or try to get the court to reconsider its decision"); State v. Shaw, 264 N.W.2d 397, 398 (Minn. 1978) (noting that after a dismissal for lack of probable cause or a dismissal pursuant to section 631.21, "it is clear that the prosecutor is free to reissue the complaint"); City of St. Paul v. Landreville, 301 Minn. 43, 46-47, 221 N.W.2d 532, 534 (1974) ("[W]hen referring to dismissals the words `with prejudice' or `permanently' must be held to be superfluous. Jeopardy has not attached * * * and the prosecution cannot be held to be prohibited from commencing another action should circumstances dictate."). This remedy of refiling the complaint is also consistent with the logic behind Rule 28.04. See Minn. R.Crim. P. 29.03 cmt. (1975) (noting that appeals from Minn.Stat. § 631.21 dismissals are not allowed because "the prosecuting authority does not need the right of appeal since it may reinstate its case by other means").[8]
Because the state could not appeal from the district court's dismissal "with prejudice" and "in the interests of justice," the state did not have an alternative, adequate remedy. Thus, the state was not procedurally precluded from petitioning for a writ of mandamus.[9]
*259 Amicus curiae Minnesota Attorney General and amicus curiae State Public Defender note that allowing the state simply to refile a complaint that was dismissed "in the interests" of justice undermines the district court's finding that the action needed to be dismissed to serve the ends of justice. We acknowledge that our jurisprudence has created a tension between a district court's authority to dismiss a complaint in the interests of justice, and the prosecutor's right, upon such a dismissal, to refile the complaint. The limited record before us does not provide a vehicle for us to address this tension. Accordingly, we refer to the Supreme Court Advisory Committee on Rules of Criminal Procedure the question of whether our rules should be amended to delete the prohibition of appeals by the state from dismissals pursuant to Minn.Stat. § 631.21, or whether other changes in the rules are necessary to address this tension.

B.
We turn next to the substantive question, which asks whether the district court either (1) had a clear and present duty to perform an act, or (2) abused its discretion by not performing an act. Minn.Stat. § 586.01 (2004); McIntosh, 441 N.W.2d at 119. The state argues that the district court had a clear and present official duty to sign the refiled complaint. We agree that the district court had a clear and present official duty here with regard to the refiled complaint. The Minnesota Rules of Criminal Procedure require that the district court must examine each complaint filed to determine whether it is supported by probable cause. See Minn. R.Crim. P. 2.01 ("Upon the information presented, the judge or judicial officer shall determine whether there is probable cause to believe that an offense has been committed and that the defendant committed it." (emphasis added)); Minn. R.Crim. P. 3.01 ("If it appears from the facts set forth in writing in the complaint and any supporting affidavits or supplemental sworn testimony that there is probable cause to believe that an offense has been committed and that the defendant committed it, a summons or warrant shall be issued." (emphasis added)). We hold that the district court had a clear and present duty to make a probable cause determination and, if probable cause was found, to sign the refiled complaint.
We reject, however, the state's argument that the district court abused its discretion by dismissing the complaint in the interests of justice. We reverse the decision of the court of appeals insofar as it found, within the context of the limited record available here, an abuse of discretion by the district court and insofar as it vacated the district court's dismissal order. The district court had the authority to dismiss the case in the interests of justice pursuant to Minn.Stat. § 631.21 and pursuant to its inherent authority.[10] The district court properly recognized that "[i]t is the court's responsibility to ensure that the calendar runs on time," and the district court indicated that it ordered the dismissal "as a deterrent to continued failures to *260 appear." These are legitimate concerns. Indeed, with regard to the scheduling question the district court seemed to face here, we have said that "the district court has considerable discretion in scheduling matters and in furthering what it has identified as the interest of judicial administration and economy." Rice Park Properties v. Robins, Kaplan, Miller & Ciresi, 532 N.W.2d 556, 556 (Minn.1995). Based on the limited record before us, we hold that the district court did not err or abuse its discretion in dismissing the complaint. The court's error was only in its refusal to conduct a probable cause determination on the refiled complaint.[11]

C.
Our conclusion that mandamus was not procedurally precluded and was substantively available does not end the analysis. A court's decision to grant a writ of mandamus is discretionary. See Minn.Stat. § 586.01 ("The writ of mandamus may be issued to any inferior tribunal * * * to compel the performance of an act which the law specially enjoins as a duty * * * [or] to exercise its judgment or proceed to the discharge of any of its functions." (emphasis added)). Accordingly, we consider all the circumstances when determining whether a writ of mandamus should issue.
Amicus curiae Minnesota Attorney General suggests that there is a separation of powers issue in this case, due to the district court's interference with the prosecutor's charging authority. We have addressed separation of powers concerns previously, noting that "[u]nder established separation of powers rules, absent evidence of selective or discriminatory prosecutorial intent, or an abuse of prosecutorial discretion, the judiciary is powerless to interfere with the prosecutor's charging authority." Krotzer, 548 N.W.2d at 254. We have held that with regard to "bringing charges and plea bargaining, the discretion rests almost entirely with the prosecutor." Streiff, 673 N.W.2d at 836. Indeed, in our discussion of dismissals under Minn.Stat. § 631.21 in Streiff, we concluded that "dismissal of a charge under the statute would actually be less intrusive [than accepting a plea to a lesser charge] because it would be without prejudice to the reinstatement of charges." 673 N.W.2d at 838. We also implied that if the dismissal precluded further charges, then we might impose some restrictions on a district court's ability to make such an order. Id. (addressing the argument that a section 631.21 dismissal might preclude further charges and concluding that "the statute would raise the same separation of powers issues that were present in Carriere and led the court to imply restrictions on the authority of the court to interfere with the prosecutor's charging function").[12] More recently, we held that "[s]ound policy reasons grounded in separation of powers *261 concerns support appellate review when a district court judge directly interferes with the charging function of the prosecutor." State v. Lee, 706 N.W.2d 491, 494 (Minn. 2005).
At the time of the dismissal, the state had charged Hart but had not proceeded to any further stage of the prosecution. After the dismissal of the complaint, the state then refiled the complaint as an exercise of its "charging function." According to our previous rulings, "discretion rests almost entirely with the prosecutor" at this stage. Streiff, 673 N.W.2d at 836. Neither the district court nor the court of appeals cited any evidence of "selective or discriminatory prosecutorial intent, or an abuse of prosecutorial discretion" as required by Krotzer, 548 N.W.2d at 254.
In order to avoid a separation of powers problem, we conclude that mandamus should lie here. We hold that granting the writ of mandamus was proper to prevent a violation of the separation of powers doctrine.[13]

II.
Hart argues that, regardless of whether mandamus was appropriate, Minnesota Rule of Civil Appellate Procedure 120.02 was violated because Hart was not directly served with the petition for writ of mandamus. Hart concedes, however, that Hart's attorney was served. We hold that service on Hart's attorney satisfied Rule 120.02. See Minn. R. Civ.App. P. 125.03 ("Personal service includes delivery of a copy of the document to the attorney * * * or to the party * * *.").
Amicus curiae State Public Defender suggests that the procedures set forth in Rule of Criminal Procedure 28.04, subd. 2(2) should be applicable when the state petitions for an extraordinary writ in a criminal case. See State v. Barrett, 694 N.W.2d 783, 787-88 (Minn.2005) (vacating the opinion of the court of appeals because the State Public Defender was not served notice of appeal as required by Minn. R.Crim. P. 28.04, subd. 2(2)). We refer this question to the Supreme Court Advisory Committee on Rules of Criminal Procedure and the Supreme Court Advisory Committee on Rules of Civil Appellate Procedure for study and recommendation.
In conclusion, we hold that the court of appeals erred when it vacated the district court's dismissal order. We affirm, however, the decision of the court of appeals to the extent that it required the district court to make a probable cause determination on the refiled complaint.
Affirmed in part and reversed in part.
NOTES
[1]  The form is labeled "Criminal Judgment and Warrant of Commitment." The "dismissed" box is checked in the section labeled "non-conviction disposition," and the words "lack of prosecution-with prejudice" are written under the checked box.
[2]  The September 19 order and memorandum was the district court's written explanation of its decision to dismiss the complaint on September 16.
[3]  The court of appeals had jurisdiction to entertain the state's petition pursuant to Minn.Stat. § 586.11 (2004) ("[W]here the writ is to be directed to a district court or a judge thereof in the judge's official capacity, * * * the Court of Appeals has exclusive original jurisdiction * * *.").
[4]  Minnesota Statutes § 631.21 (2004) states, in pertinent part, that "[t]he court may order dismissal of an action either on its own motion or upon motion of the prosecuting attorney and in furtherance of justice."
[5]  Rule 30.02 provides that "[i]f there is unnecessary delay in bringing a defendant to trial, the court may dismiss the complaint." We have required a showing of prejudice for a dismissal under the rule. See, e.g., State v. Borough, 287 Minn. 482, 486, 178 N.W.2d 897, 899 (1970).
[6]  The court of appeals has also recognized this rule. See City of West St. Paul v. Banning, 409 N.W.2d 530, 531 (Minn.App.1987) ("The phrases `with prejudice' and `without prejudice' are irrelevant to a determination of the finality of a dismissal in a criminal case.").
[7]  Although there is a technical difference between the phrase "in furtherance of justice" from Minn.Stat. § 631.21 and "in the interests of justice," we treat these phrases similarly. See, e.g., State v. Fleck, 269 N.W.2d 736, 737 (Minn.1978) (discussing section 631.21, we concluded that "the interests of justice were not furthered by the dismissal" (emphasis added)).
[8]  Minnesota Rule of Criminal Procedure 29.03 is the predecessor rule to the current Minn. R.Crim. P. 28.04. Although this comment was not carried forward to the new version of the rule, the language relating to appeals from section 631.21 orders did not change from Rule 29.03 to Rule 28.04. Thus, the comment continues to provide guidance today.
[9]  The district court did not cite Minn.Stat. § 631.21 in its memorandum. Amicus curiae State Public Defender suggests that the dismissal in the interests of justice may have been ordered pursuant the court's "inherent authority," as opposed to the authority granted it in Minn.Stat. § 631.21, and that "inherent authority" dismissals may be appealable. We have not treated "interests of justice" dismissals differently based on the source of the court's authority (statutory or inherent powers) and we decline to do so in this case. See City of St. Paul v. Landreville, 301 Minn. 43, 47, 221 N.W.2d 532, 534 (1974) ("[T]he court has the inherent power to dismiss a case in the interest or furtherance of justice, whether that power is expressly conferred by statute or arises by implication.").
[10]  Amicus curiae Minnesota Attorney General suggests that we should rule that the standard for a dismissal in the interest of justice is a "clear abuse of the prosecutorial charging function" (the same as the standard for a stay of adjudication). See State v. Lee, 706 N.W.2d 491, 496 (Minn.2005). On the limited record before us, we expressly decline to rule on what standard should be applied to "interests of justice" dismissals.
[11]  Nothing we have said here should indicate how the district court should resolve this question. Nor should our opinion preclude the district court from considering a dismissal under Minn. R.Crim. P. 30.02 if appropriate at some stage.
[12]  In Streiff, we briefly summarized our opinion in Carriere:

To satisfy separation of powers concerns, Carriere conditioned the district court's acceptance of the defendant's motion [to plead guilty to a lesser included offense over the opposition of the prosecutor] on whether the prosecutor can "demonstrate to the trial court that there is a reasonable likelihood that the state can withstand a motion to dismiss the charge at the close of the state's case in chief." We concluded that if the prosecutor can satisfy this condition, the district court "should refuse to accept the tendered guilty plea."
Streiff, 673 N.W.2d at 834 (quoting State v. Carriere, 290 N.W.2d 618, 619, 621 (Minn. 1980)).
[13]  Mandamus has been used in other jurisdictions when separation of powers concerns are implicated. See In re Vasquez-Ramirez, 443 F.3d 692, 700-01 (9th Cir.2006) (holding that a writ of mandamus was the appropriate remedy based, in part, on separation of powers concerns when a district court refused to accept a defendant's guilty plea); In re Ellis, 356 F.3d 1198, 1209-10 (9th Cir.2004) (finding mandamus appropriate when the district court "effectively and improperly inserted itself into the charging decision" by vacating the defendant's plea).
