To perform colonoscopy, it is recommended to take magnesium sulfate solution about 2~6h in advance, and pay attention to drinking a lot of water while taking it, and at the same time, it is necessary to pay attention to the suspicion of intestinal obstruction and other conditions prohibited. Before the colonoscopy, if you need to use magnesium sulfate for diarrhea, you can start taking it 2-6 hours before the examination, and it is recommended to finish taking it within 2 hours. In the course of administration, attention should be paid to the intake of sufficient amount of water to avoid causing dehydration. Once the watery stools begin to be passed, the colonoscopy can be started. It should be noted that the use of magnesium sulfate for diarrhea is contraindicated in cases where gastrointestinal bleeding is suspected or present, in women during pregnancy, in the presence of an acute abdominal condition, in the midst of menstruation, or in the presence of suspected intestinal obstruction or perforation. Magnesium sulfate needs to be administered under the supervision of a clinician; a period of fasting is recommended before the colonoscopy.