46-13-401. Dismissal at instance of court or prosecution. (1) The court may, either on its own motion or upon the application of the prosecuting attorney and in furtherance of justice, order a complaint, information, or indictment to be dismissed. However, the court may not order a dismissal of a complaint, information, or indictment, or a count contained in a complaint, information, or indictment, charging a felony, unless good cause for dismissal is shown and the reasons for the dismissal are set forth in an order entered upon the minutes.
(2) After the entry of a plea upon a misdemeanor charge, the court, unless good cause to the contrary is shown, shall order the prosecution to be dismissed, with prejudice, if a defendant whose trial has not been postponed upon the defendant's motion is not brought to trial within 6 months.