Support Forum

Advanced Search
Forum Scope


Match



Forum Options



Minimum search word length is 3 characters - maximum search word length is 84 characters
general-topic
Optimizing SF db Tables
Avatar
jim
Here and Now
Member
Pro Subscribers
Offline
Jun 5, 2013 - 10:20 am

Mr P. said
those are wp tables...

That's what I thought, just needed to confirm we weren't missing some tables!

Yellow S. said
It is probably pretty safe...

Thanks again for the feedback. I ran these queries, and was able to reduce the size of the sfmembers table, but only by about 8MB. Think I'll quit while I'm ahead. but every little bit counts, eh?

Good luck keeping the WP transient rows under control in the options table!

I hear ya there! Our wp_1_options had grown to 60+ MB. I got it down to 1.5 MB using the following...

DELETE FROM `wp_1_options` WHERE `option_name` LIKE ('_transient_%');

Finally, should at some point we decide to clean out the wp_users I've now deleted from sfmembers, would this do the trick for me in bulk?

DELETE FROM wp_users WHERE user_id
NOT IN (
SELECT user_id
FROM wp_1_sfmembers
)

Thanks again! I really appreciate all the hand-holding through this.

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Jun 5, 2013 - 11:35 am

That query should work OK against the users table. You would need to run the same thing against the usermeta table as well.

andy-signature.png
YELLOW
SWORDFISH
Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Jun 5, 2013 - 11:36 am

we do a periodic clean up of the transients just like you within simple press... but of course, we just clean up any SP transients... dont really want to take a chance mucking with core or other plugin transients that we may not understand...

maintenance can be a chore!

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Jun 5, 2013 - 12:04 pm

(When I do them I just delete the lot! laugh And good riddance. It is a horribly flawed sub-system...)

andy-signature.png
YELLOW
SWORDFISH
Avatar
jim
Here and Now
Member
Pro Subscribers
Offline
Jun 20, 2013 - 1:45 pm

Yellow Swordfish said:

That query should work OK against the users table.

I wanted to review these users before deleting them. But when I run this query:

Select * FROM wp_users WHERE user_id NOT IN ( SELECT user_id FROM wp_1_sfmembers )

I get the following error:

#1054 - Unknown column 'user_id' in 'IN/ALL/ANY subquery'

I have confirmed, however, that the user_id column does indeed exist in wp_1_sfmembers. Any thoughts?

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Yellow Swordfish
Glinton, England
SP Master
Offline
Jun 20, 2013 - 2:51 pm

Sorry - my fault.

There is NO user_id column in the WP users table. It is named 'ID' in that table.

andy-signature.png
YELLOW
SWORDFISH
Avatar
jim
Here and Now
Member
Pro Subscribers
Offline
Jun 22, 2013 - 10:36 pm

There is NO user_id column in the WP users table. It is named 'ID'...

Thank you! Query works that way.

Sorry for the late reply, still banging our heads here trying to nail down the case of our recent MySQL issues. This will help us continue housekeeping in the meantime.

TripawdsSimple:Press powers the Tripawds Discussion Forums.

It's better to hop on three legs than to limp on four.

The Tripawds Blogs Community is made possible by The Tripawds Foundation.

Avatar
Mr Papa
Simi Valley, CA
SP Master
Free Members
Offline
Jun 23, 2013 - 12:46 am

okay... we will be here...   most of the other clean ups have been made in 5.3...

Forum Timezone: Europe/Stockholm
Most Users Ever Online: 1170
Currently Online:
Guest(s) 1
Currently Browsing this Page:
1 Guest(s)
Top Posters:
Mr Papa: 19448
Ike: 2086
Brandon: 864
kvr28: 804
jim: 650
FidoSysop: 577
Conrad_Farlow: 531
fiddlerman: 358
Stefano Prete: 325
Member Stats:
Guest Posters: 619
Members: 17361
Moderators: 0
Admins: 4
Forum Stats:
Groups: 7
Forums: 17
Topics: 10127
Posts: 79625