
18 Cal.2d 726 (1941)
BARTHOLOMAE OIL CORPORATION (a Corporation), Petitioner,
v.
THE SUPERIOR COURT OF THE CITY AND COUNTY OF SAN FRANCISCO, Respondent.
L. A. No. 17895. 
Supreme Court of California. In Bank.  
Oct. 10, 1941.
 Earl D. Killion for Petitioner.
 Vincent W. Hallinan, Carey Van Fleet, Emmett R. Burns for Respondent.
 GIBSON, C.J.
 By this proceeding in mandamus petitioner seeks to compel the respondent superior court to vacate a decree and to grant a trial de novo.
 In May, 1937, one Lucientes instituted an action in the respondent superior court against the Bartholomae Oil Corporation, petitioner here, to establish a trust interest in certain mining properties and for an accounting. Complaints in intervention were filed by Root and Dalziel, two other claimants to an interest in the trust. The cause was tried before Honorable Everett C. McKeage over a period of sixteen days. On November 14, 1940, Judge McKeage rendered an interlocutory decree which adjudged that plaintiff Lucientes and the plaintiffs in intervention, Root and Dalziel, had a 10% interest in the subject matter of the action, Lucientes and Root each having an undivided 40% and Dalziel an undivided 20% of said interest. The decree also ordered an accounting for the years 1935 to 1940, and further provided that "upon the rendition of said account ... a final decree shall be entered fixing the interest of the plaintiff ... and plaintiffs in intervention ... in accordance with this interlocutory decree. ..." On the following day a referee was appointed to conduct the accounting.
 In the interim an election had been held at which Judge McKeage was not returned to office. As a result, his term expired on January 6, 1941, at which time the accounting had been commenced before the referee, but not finished. On January 8, 1941, the defendant oil corporation gave notice that it would move to vacate the interlocutory decree and appointment of referee and for a trial de novo on the ground that no final judgment had been rendered in the cause before the trial judge left the bench and that no other judge might appropriately enter such final judgment. The motion to vacate *728 came on for hearing before another judge of the respondent superior court who, on March 3, 1941, denied it on the ground that the interlocutory decree decided all issues save the accounting, which could as well proceed before a different judge of the same court. This proceeding in mandamus was thereupon instituted to compel the respondent court to vacate the interlocutory decree and the order appointing the referee and to grant a trial de novo.
 [1] We are satisfied that petitioner is not entitled to the relief here sought. Petitioner relies upon the cases of Gunder v. Gunder, 208 Cal. 559 [282 P. 794], Di Blasi v. Di Blasi, 209 Cal. 753 [290 P. 7], and Middleton v. Finney, 214 Cal. 523 [6 PaCal.2d 938, 78 A.L.R. 1104], which held that where a decree determines the rights of the parties but refers the case to a referee for an accounting, upon which a further decree is to be entered, the first or interlocutory decree is not a "final" decree for purposes of appeal. Those cases present clearly distinguishable factual situations and are not determinative of our present problem. Nor do we question the principle relied on by petitioner in the respondent court, and here, that a party "is entitled to have a trial upon all of the facts before a judge hearing all the evidence in the case", citing McAllen v. Souza, 24 Cal.App.2d 247 [74 PaCal.2d 853], De Mund v. Superior Court, 213 Cal. 502 [2 PaCal.2d 985], and Hughes v. De Mund, 96 Cal.App. 365 [274 P. 405]. But, it is equally true that there are many acts which a successor judge may perform where the trial judge leaves the bench. A discussion of the subject and a collection of cases dealing therewith may be found in 30 Am. Jur. 750, sec. 38; 33 C.J. 972, sec. 103; 54 A.L.R. 952; 58 A.L.R. 848; 114 A.L.R. 435. See also Crim v. Kessing, 89 Cal. 478, 489 [26 P. 1074, 23 Am. St. 491], and Cocke v. MacLeod, 85 Cal.App. 63, 65-68 [258 P. 980].
 In the last cited case the trial judge retired from the bench after entering an interlocutory decree declaring that plaintiff was the owner of a half interest in property, and appointing a referee to conduct an accounting. Prohibition was sought to restrain the referee from proceeding on the ground that "such court is without jurisdiction to render a final judgment founded upon the interlocutory judgment, and consequently that the referee appointed by the court is also *729 without jurisdiction in the premises." In rejecting this contention Mr. Justice Houser, then a member of the District Court of Appeal, stated that "It is clear that the order is not one merely personal to the judicial officer of the court, but is an order by the court itself and as such unaffected by the retirement of the judge who made it. Were it otherwise, no judge, other than the one making the appointment of a receiver or a referee, even in a condemnation proceeding, would be authorized to receive and act upon the report of such appointee; and a similar situation might result in an action, arising from the death or retirement of a judge who theretofore had made an order appointing a notary public or commissioner to take a deposition. ... Section 184 of the Code of Civil Procedure is as follows: 'No proceeding in any court of justice, in an action or special proceeding pending therein, shall be affected by a vacancy in the office of all or any of the judges thereof.' Aside from lack of authority to the effect that because of the retirement of the judge who made the order of appointment of the referee in the instant case, the powers of such referee ceased, the statutory authority to which reference has been had is broad enough in its scope to cover the situation here presented."
 [2] However, because of developments subsequent to the filing of the present petition, we do not find it necessary to rest our decision herein solely upon the proposition that upon rendition of the account a judge other than the trial judge, without any necessity for an examination of the evidence, might well perform the more or less perfunctory act, under the circumstances here present, of entering the final decree "fixing the interest of the plaintiff ... and plaintiffs in intervention ... in accordance with this interlocutory decree. ..." It now appears that Judge McKeage has been returned to the bench by appointment of the Governor and is a member of the respondent court. Petitioner has refused to stipulate that Judge McKeage may proceed in the cause. It appears, however, from correspondence now in the file of this proceeding that the cause has been reassigned by the Presiding Judge of the respondent court to the department presided over by Judge McKeage. We are satisfied that he may properly proceed therein. Citation of authority is unnecessary to establish that if Judge McKeage had been reelected at the expiration of his term of office, he would have *730 had undoubted jurisdiction to proceed with the consideration and determination of matters partially tried by him during his prior term. The circumstance that his second or succeeding term was the result of appointment rather than reelection, even though preceded by a short interval of nonjudicial activity, does not suggest a different result under the facts here present.
 Petitioner's refusal to stipulate that Judge McKeage may proceed in the cause materially detracts from, if it does not totally destroy, the contention that it "is entitled to a decision upon the facts of [its] case by the Judge who hears the evidence. ..." Such refusal indicates a desire to secure a second trial of the merits rather than full participation by the judge who heard the evidence and entered the interlocutory decree.
 [3] In conclusion, it may be stated that the issuance of a writ of mandamus is not a matter of right but involves a consideration of its effect in promoting justice. (Wiedwald v. Dodson, 95 Cal. 450 [30 P. 580].) Its issuance or refusal to a considerable extent lies within the sound discretion of the court. (Rogers v. Board of Directors, 218 Cal. 221 [22 PaCal.2d 509]; Clough v. Baber, 38 Cal.App.2d 50 [100 PaCal.2d 519].) As stated in the Rogers case, quoting from High on Extraordinary Legal Remedies, "cases may therefore arise where the applicant for relief has an undoubted legal right, for which mandamus is the appropriate remedy, but where the court may, in the exercise of a wise discretion, still refuse the relief. ..." In other words, while a court should not arbitrarily grant or refuse the writ, in the exercise of a wise discretion it may refuse the relief where the applicant's substantial rights are otherwise amply protected. (16 Cal.Jur. 768, sec. 7, and authorities there cited.) [4] In the instant proceeding it is apparent that the petitioner may and will procure a complete disposition of the action pending in the respondent court by the judge who has heard the evidence and entered the interlocutory decree. The writ here sought is not indispensable to that purpose. Our conclusion serves to expedite the litigation by obviating the necessity for a new trial, thus saving expense to the litigants while conserving the time of the courts. Petitioner's highly technical position tends to defeat rather than subserve the ends of justice. *731
 For the foregoing reasons, the alternative writ is discharged and the proceeding is dismissed.
 Carter, J., Traynor, J., Moore, J., pro tem., and Pullen, J., pro tem., concurred.
