Often they do a gastroscopy which is a special camera that goes through the mouth. The have a look at the gut and a few other bits. Sometimes they take biopsies which are small snips of the lining of the stomach etc. They are so small they don't require stitches or anything like that and are not painful. They are smaller that the nail on your pinkie finger... infact, sometimes they are difficult to get off the snares (which they use to take the biopsy) with the tip of a needle.
A gastroscope is a fairly quick procedure - usually about 30 minutes long. It is a day proceedure which means you can usually go home a couple of hours after the proceedure. All the peadeatric gastroenterologists that I know (the docs who do the scope) use an anethetist and children are given a light anesthetic throughout the proceedure (where as adults usually get mild sedation). So your child will be asleep for the proceedure. The drugs used have an amnesic property which means she won't remember much of the day and certainly not the bit just before she goes in or when she is waking up.

What they do for failure to thrive will depend on what the cause is or what they think the best mode of action is going to be. I'm sure Schmickers will have many more answers than I do - the only things I know of are nutritional supplements, nasogastric feeding (which is a tube that they put through the nostril and into the stomach - it stays there until not needed anymore) so the food goes right to where it needs to be, and PEG feeding which is where they put a port (access point) into the child's stomach (this is surgically done - again a day proceedure thing) and special food is used through this site to feed the child. PEG feeding is usually a last resort.

It is probably a good idea to take a list of quetions to your pead's appointment and ask them.

HTH

MG