
76 Cal.Rptr.3d 664 (2008)
162 Cal.App.4th 1364
Gabriel Michael KRUSE, Petitioner,
v.
The SUPERIOR COURT of San Joaquin County, Respondent;
The People, Real Party in Interest.
No. C055654.
Court of Appeal of California, Third District.
May 15, 2008.
*665 James L. Larsen, Public Defender, and John B. Lauper, and Nelson C. Lu, and Anna G. Teruel, Deputy Public Defenders, for Petitioner.
Edmund G. Brown, Jr., Attorney General, Dane R. Gillette, Chief Assistant Attorney General, Michael P. Farrell, Senior Assistant Attorney General, Stephen G. Herndon, Julie A. Hokans, and Harry Joseph Colombo, Deputy Attorneys General, for Real Party in Interest.
NICHOLSON, J.
Penal Code section 861[1] gives the accused a right to a continuous preliminary hearing. It states: "The preliminary hearing shall be completed at one session or the complaint shall be dismissed, unless the magistrate, for good cause shown by affidavit, postpones it ...."(§ 861, subd. (a).)
Petitioner Gabriel Michael Kruse is being prosecuted for several alleged felonies. His preliminary hearing began and was continued pursuant to the parties' agreement. *666 Petitioner waived his right to a continuous hearing, but only to the date on which it was agreed the preliminary hearing would be reconvened. On the agreed-upon date, however, the deputy district attorney prosecuting the case was ill and, for unrelated reasons, petitioner was not transported to the court. Although another deputy district attorney filed an affidavit concerning the prosecutor's illness, no affidavit was filed concerning why petitioner was not transported to the court. The replacement prosecutor could have proceeded with the preliminary hearing if petitioner had been there. However, because of the transportation problems, several more days passed before the preliminary hearing was reconvened. After reconvening the preliminary hearing, the magistrate overruled petitioner's objection to the proceedings and, after hearing evidence, bound petitioner over for trial.
The prosecution filed an information, and petitioner moved to dismiss, asserting that his right to a continuous preliminary hearing had been violated. The trial court denied petitioner's motion.
Petitioner seeks a writ of mandate requiring dismissal of the information. We conclude that the information must be dismissed because the delay in reconvening the preliminary hearing was caused by the failure to transport petitioner to court and there was no good cause shown by affidavit for this delay, which caused petitioner to remain in custody for several days without a probable cause determination.

BACKGROUND

Prior Dismissed Complaints
In November 2006, the district attorney filed a complaint against defendant (LF009652A). It charged 12 felony counts on allegations of incidents that took place in August, September, and October 2006, including counts related to theft, identity theft, stolen property, and counterfeiting.
Later the same month, the district attorney filed another complaint against defendant (LF009674A). It alleged four felony counts and one misdemeanor count that took place in November 2006, including counts related to stolen property, possession of a firearm, and false identification.
Both complaints were dismissed on the People's motion on December 11, 2006.

Preliminary Hearing on Current Complaint
On December 13, 2006, the district attorney filed a new complaint (LF009713A) based, for the most part, on conduct alleged in the earlier complaints. A preliminary hearing on the complaint began on December 27, 2006. After several prosecution witnesses had testified, the magistrate noted that it appeared unlikely the hearing would be completed that day. The prosecutor and defense counsel both agreed. After an off-the-record discussion, the magistrate stated that the parties had agreed to resume the preliminary hearing on January 8, 2007. Defense counsel added: "I do want to indicate that at this point in time it is in a time-not-waived posture. [Petitioner's] willing to waive 861 and waive time, but we don't want to enter into a general time waiver." Responding to the magistrate's questioning, petitioner expressly waived his right to a continuous preliminary hearing pursuant to section 861 and waive time until January 8.
The magistrate signed an order on January 3, directing (1) Deuel Vocational Institute (DVI), in Tracy, where petitioner was being held, to release petitioner to the San Joaquin County Sheriffs Office and (2) the San Joaquin County Sheriffs office *667 to transport petitioner to court on January 8.[2]

Continuances
Two problems arose on January 8, 2007: the deputy district attorney was hospitalized and petitioner was not transported to the court.
Deputy District Attorney Ronald Richards, who had handled the first part of the preliminary hearing, was in Sacramento in the hospital under observation for an abdominal ailment after he suddenly became ill. In his place appeared Deputy District Attorney Patricia Rieta-Garcia, who informed the court of the reason for Deputy District Attorney Richards's absence.
For reasons unrelated to Deputy District Attorney Richards's absence, petitioner was not transported to the court. Petitioner had been moved from DVI to a state prison in Wasco, near Bakersfield, because one of petitioner's relatives worked at DVI. Prison policy is that inmates may not be housed in facilities where their relatives work. Defense counsel objected to petitioner's absence and noted that he was not authorized to further waive time. The trial court stated that it would put the case over to January 10, two days later, and issue a new order to the Department of Corrections and Rehabilitation to have petitioner in court.
Defense counsel objected to the continuance and noted that the facts upon which the court was relying were hot supported by an affidavit. The court asked Deputy District Attorney Rieta-Garcia if it was possible to provide an affidavit. Later that day, she submitted an affidavit stating that Deputy District Attorney Richards was in the hospital in Sacramento, under observation, and that she did not have possession of the file in this case.[3]
On January 10, 2007, petitioner was still in Wasco. Defense counsel again objected, and the magistrate again continued the case, this time to January 12. On January 11, however, the magistrate issued an ordering directing the Department of Corrections to transport petitioner to court on January 16, not January 12.
On January 12, 2007, petitioner's case was called. Petitioner was then in Mule Creek State Prison, in lone, and not in court. Defense counsel noted the continuing objection to the delay in the preliminary hearing. And the magistrate ordered everyone to return on January 16.
On January 16, 2007, petitioner was present in court, and Deputy District Attorney Rieta-Garcia was ready for the People. Defense counsel objected to further proceedings and moved to dismiss based on violation of section 861. The magistrate denied the motion to dismiss and proceeded with the remainder of the preliminary hearing. It found probable cause as to six felony counts and bound petitioner over for trial.
*668 At the end of the hearing, Deputy District Attorney Rieta-Garcia expressed frustration with the housing and transportation problems. She stated that, if petitioner had been in court on January 8, she "probably would have been able to do the case...."

Denial of Motion to Dismiss in Trial Court
After an information was filed and petitioner was arraigned, he moved to dismiss pursuant to section 995, alleging that he "had not been legally committed by a magistrate."[4] He asserted that the delays violated his rights under section 861. The trial court denied the motion as to the section 861 assertion, finding that petitioner waived his right to a continuous preliminary hearing. The court focused on the illness of Deputy District Attorney Richards and the time his replacement, Deputy District Attorney Rieta-Garcia, needed to prepare. The court also found that the transportation problems were out of the control of the parties. According to the court, these circumstances provided good cause for the delays.
Petitioner filed a petition for writ of mandate in this court. We stayed the proceedings in the trial court and granted an alternative writ.

DISCUSSION
Petitioner contends that the continuances granted by the court after January 8 violated his right to a continuous preliminary hearing pursuant to section 861. The Attorney General responds that petitioner's contention should be rejected for two reasons: petitioner unequivocally and unconditionally waived his right to a continuous preliminary hearing and the continuances were for good cause. We conclude that (1) the continuances violated section 861, (2) petitioner's waiver of his right to a continuous preliminary hearing was limited to reconvening the preliminary hearing on January 8, and (3) the Attorney General's assertion that the continuances were for good cause is not supported on this record.

1. Violation of Section 861 and Prejudice

"[T]he purpose of section 861 is to ensure that, once commenced, the preliminary examination will proceed continuously onward, and be expeditiously completed, without significant interruptions to which the parties have not consented, and which are not justified by good cause."[5] (Stroud *669 v. Superior Court (2000) 23 Cal.4th 952, 967, 98 Cal.Rptr.2d 677, 4 P.3d 933 (Stroud).) The statute is "intended to protect a party from loss of liberty for an unreasonable time under the pretext of a criminal charge against him...." (People v. Van Horn (1897) 119 Cal. 323, 326, 51 P. 538, overruled on another ground in People v. Elliot (1960) 54 Cal.2d 498, 503-504, 6 Cal.Rptr. 753, 354 P.2d 225.)
In considering a defendant's contention that an information must be set aside because of a violation of section 861, we must decide "simply whether the magistrate abused the sound discretion accorded him by section 861's good-cause provision, and thus violated that statute...." (Stroud, supra, 23 Cal.4th at p. 968, 98 Cal.Rptr.2d 677, 4 P.3d 933.)
The Supreme Court considered issues related to section 861 in Stroud. In that case, two defendants were charged with murder. They stipulated that their preliminary hearing could be interrupted so that the prosecutor could attend a meeting and defense counsel could review discovery. The preliminary hearing was additionally interrupted for one day so that the magistrate could attend a Judicial Council meeting. The defendants moved for dismissal of the information for violation of their rights under section 861. The trial court denied the motion, but the Court of Appeal reversed, directing the trial court to dismiss. (Stroud, 23 Cal.4th at pp. 956-957, 98 Cal.Rptr.2d 677, 4 P.3d 933.)
The Supreme Court reversed the judgment of the Court of Appeal. It declined to hold that the defendants had waived their right to a continuous preliminary hearing by agreeing to the interruptions for specified reasons. The court held, however, that, under the totality of circumstances, the magistrate's adjournment of the preliminary hearing to attend the Judicial Council meeting constituted good cause because the preliminary hearing exceeded its time estimate, defendants belatedly objected, the delay was brief, and the defendants claimed no prejudice other than an extra day in custody. (Stroud, supra, 23 Cal.4th at pp. 973-974, 98 Cal. Rptr.2d 677, 4 P.3d 933.)
Petitioner does not claim that the delay to January 8, which was a continuance to which he consented, is the basis for dismissal. But he argues that the delay from January 8 to January 16 violated his right to a continuous preliminary hearing. We agree that the delay was not justified by an affidavit showing good cause and was, therefore, an abuse of the magistrate's discretion.
The trial court, when it considered the section 995 motion, opined that the deputy district attorney was not required to go forward without the transcript of the first part of the preliminary hearing.[6] There are two problems with this justification: (1) the transcript was not ready until after the completion of the preliminary hearing, rendering illogical the reasoning that the delay was justified because the transcript was not available, and (2) no one filed an affidavit supporting this reasoning. Furthermore, the replacement prosecutor stated that she "probably would have been *670 able to do the case" on January 8 if petitioner had been present in court.
Here, the delay was for more than one day, which was the delay for the magistrate to attend the Judicial Council meeting in Stroud. If the preliminary hearing had been reconvened on January 8, as planned, it would have been completed that day, judging from the completion of the preliminary hearing in one day on January 16. Eight additional days is a significant amount of time to remain in custody with no probable cause determination after the start of a preliminary hearing. The statutory remedy for this violation of petitioner's right to a continuous preliminary hearing is dismissal. (§ 861, subd. (a).)
Unless the Attorney General's arguments establish that the delay was justified under the requirements of the statute, we must therefore order dismissal. Hence, we turn to those arguments.

2. Limitation of Petitioner's Waiver

The Attorney General contends that petitioner unequivocally and unconditionally waived his right to a continuous preliminary hearing and, therefore, is not entitled to the writ relief he seeks. We conclude that, although petitioner waived his right to a continuous preliminary hearing, that waiver was limited to the agreed-upon continuance.
In Stroud, the court held that the defendant's consent to an interruption of the preliminary hearing to a specific date did not act as a general waiver of further continuity in the preliminary hearing. (23 Cal.4th at p. 967, 98 Cal.Rptr.2d 677, 4 P.3d 933.) The same is true here. Petitioner consented to an interruption in the preliminary hearing that was to end on January 8. That consent did not waive further continuity.
Referring to the language used in obtaining petitioner's consent, the Attorney General argues that petitioner generally waived his right to a continuous preliminary hearing. In context, however, the waiver was limited to the contemplated period. After defense counsel said that petitioner "would waive time until the 8th," the magistrate obtained petitioner's waiver in the following colloquy:
"THE COURT: You have a right to have this keep going, essentially not straight through, but without the Court taking up other business in between. So if you waive that right, you are saying we could split it, in this case in half, because we don't do it in multiple times. One more time to finish it. You are willing to waive your right to a continuous preliminary hearing to have that done?
"[PETITIONER]: Yes."
Because (1) petitioner's waiver was taken in the context of continuing the preliminary hearing to a specific date, (2) defense counsel advised the court that the waiver was limited in time to January 8, and (3) the magistrate did not ask petitioner to waive the right beyond that date, the record does not reflect a general waiver of the right to a continuous preliminary hearing.

3. Showing of Good Cause

The record does not reflect a showing of good cause supported by affidavit. The Attorney General makes no argument that the transportation problems, which were not established by affidavit, were the basis of a good cause determination. Instead, he claims that the illness of Deputy District Attorney Richards was good cause to delay the preliminary hearing until January 16. We disagree because the actual reason for the long delay was the inability of the authorities to produce petitioner in court.
*671 Although the trial court based its ruling, at least in part, on the good cause it found concerning the transportation problems, the Attorney General does not make the argument that the transportation problems were good cause for the delay. The implicit concession is appropriate. No one filed an affidavit supporting such an allegation of good cause. The statute requires that any showing of good cause be supported by affidavit. (§ 861, subd. (a).) The only affidavit filed in this case concerned the illness of the deputy district attorney.[7]
With respect to the illness of Deputy District Attorney Richards, the Attorney General attempts to downplay the statement of the replacement deputy district attorney to the effect that, if petitioner had been in court on January 8, she could have proceeded. He calls the statement a "speculative after-the-fact assertion." To the contrary, under the totality of circumstances as shown by this record, that statement was a candid acknowledgement that the length of the delay was a result of the transportation problems.
On January 8, the magistrate put the matter over to January 10 and made it clear that it was important to have petitioner in court that day. The magistrate said: "[W]e're going to need to let the State Department of Corrections know we have an order. So it's not if they are going to get him here, they are going to get him here if they have to put somebody in a car and drive him here and we want him here for Wednesday [January 10]. I'll make that order." When the magistrate took up the matter on January 10, petitioner was still in Wasco. Deputy District Attorney Rieta-Garcia said she was trying to get petitioner back up to Northern California by the next day. As noted above, however, petitioner did not appear in court again until January 16.
In this case, the delay was caused by the inability of the government to produce petitioner in court, even though petitioner was incarcerated. We are convinced that, with proper attention to petitioner's rights, the authorities could have gotten petitioner to court when his presence was required, even taking into account valid institutional policies. Certainly, an affidavit spelling out the justification for taking petitioner so far from the court where he was in the middle of a preliminary hearing would have been necessary to support the magistrate's exercise of discretion in delaying the preliminary hearing because of petitioner's absence. No such affidavit was filed.
"[W]hen a defendant presents, by way of a pretrial writ petition, claims that establish irregularities in preliminary hearing procedures, the court will grant relieffor example, dismissal and remand for a new, properly conducted preliminary hearing'without any showing of prejudice.'" (People v. Stewart (2004) 33 Cal.4th 425, 461, 15 Cal.Rptr.3d 656, 93 P.3d 271, citing and quoting People v. Pompa-Ortiz (1980) 27 Cal.3d 519, 529, 165 Cal.Rptr. 851, 612 P.2d 941.) Petitioner's right to a continuous preliminary hearing was violated without good cause. Therefore, he is entitled to the statutory remedy, which is dismissal.

DISPOSITION
The alternative writ is discharged. Let a peremptory writ of mandate issue directing *672 respondent court to vacate its order denying petitioner's motion to dismiss and to enter a new and different order granting the motion. The stay shall remain in effect until the information is dismissed.
We concur: DAVIS, Acting P.J., and RAYE, J.
NOTES
[1]  Further code references, though unspecified, are to the Penal Code.
[2]  The record is unclear, but it appears petitioner may have been moved from the county jail to DVI because of an incident that occurred at the county jail.
[3]  The Attorney General's request for judicial notice of Deputy District Attorney Rieta-Garcia's affidavit is granted. Petitioner asserts that the request should not be granted because the affidavit was not filed before the judge granted the continuance and because it did not state the location where the affidavit was signed and was not executed under the laws of the State of California. We reject these assertions. The timing of the affidavit does not prevent us from taking judicial notice of the affidavit. And the perceived deficiencies in the affidavit, likewise, do not prevent judicial notice. The affidavit was filed in court in this action and is therefore a proper subject of judicial notice. (Evid.Code, § 452, subd. (d).)
[4]  Section 995 requires the trial court to set aside the information if, among other reasons," "the defendant had not been legally committed by a magistrate." (§ 995, subdivision (a)(2)(A).)
[5]  In full, section 861 states:

"(a) The preliminary examination shall be completed at one session or the complaint shall be dismissed, unless the magistrate, for good cause shown by affidavit, postpones it. The postponement shall not be for more than 10 court days, unless either of the following occur:
"(1) The defendant personally waives his or her right to a continuous preliminary examination.
"(2) The prosecution establishes good cause for a postponement beyond the 10-court-day period. If the magistrate postpones the preliminary examination beyond the 10-court-day period, and the defendant is in custody, the defendant shall be released pursuant to subdivision (b) of Section 859b.
"(b) The preliminary examination shall not be postponed beyond 60 days from the date the motion to postpone the examination is granted, unless by consent or on motion of the defendant.
"(c) Nothing in this section shall preclude the magistrate from interrupting the preliminary examination to conduct brief court matters so long as a substantial majority of the court's time is devoted to the preliminary examination.
"(d) A request for a continuance of the preliminary examination that is made by the defendant or his or her attorney of record for the purpose of filing a motion pursuant to paragraph (2) of subdivision (f) of Section 1538.5 shall be deemed a personal waiver of the defendant's right to a continuous preliminary examination."
[6]  We consider, below, two other reasons the trial court gave for denying the section 995 motion-that is, petitioner's waiver of his right to a continuous preliminary hearing and the existence of good cause based on the prosecutor's illness.
[7]  Asserting there were some irregularities in the form of the affidavit and the fact that it was filed after the magistrate had already postponed the remainder of the preliminary hearing on January 8, petitioner argues that we should not consider the affidavit. We need not consider this argument because, even if the affidavit was proper in all respects, it does not change the result here.
