How to get roaches out of my database

This began on the post “Please help me speed up my site.” I solved most of the speed problem by removing some plugins.

However, when drmike suggested I look at my error logs it was like looking under a rug and finding roaches.

In summary, some users signed up on my site and left their own shopping carts. Even though I deleted their messages and then deleted the users, they still left a lot of their links to shopping carts in my database. If the links were dead, maybe it would not matter. But they generate continuous errors even when my site is not otherwise active.

I have attached a PDF file with a list of many of the errors that continue to appear. All the links shown have nothing to do with my site, nor do I even want to associate with them.

I am looking for suggestions on how I can find these unwanted files in my database and delete them.

A related question is how to prevent this kind of thing from happening.

Thanks for your help,

Ed