Querying MySQL db directly

We’re running into issues querying through the url now, we’re getting out of memory errors and it’s no longer pheasable to pull our traffic reports that way. Can anyone provide an example of how to query the database tables directly to pull visitor log/activity?

No one has any information on this?

we’re getting out of memory errors