Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Rather large objects_entity table
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  12 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Hayden Shaw  
View profile  
 More options Apr 17 2012, 11:32 pm
From: Hayden Shaw <hayden.s...@core-ed.ac.nz>
Date: Tue, 17 Apr 2012 20:32:28 -0700 (PDT)
Local: Tues, Apr 17 2012 11:32 pm
Subject: Rather large objects_entity table

Hi all,

We have recently noticed our objects_entity table is growing to something
quite large.  The table is currently sitting around 400mb with about
500,000 entries, which matches up with about the same in the entities table
so no worries there.  

Can anyone confirm if this is normal behavior though?  We did notice that
there was a fulltext index on the title and description fields so this is
probably contributing to the size of the table.  Looking forward to any
comments.

Cheers Hayden


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Steve Clay  
View profile  
 More options Apr 18 2012, 12:33 am
From: Steve Clay <st...@mrclay.org>
Date: Wed, 18 Apr 2012 00:33:16 -0400
Local: Wed, Apr 18 2012 12:33 am
Subject: Re: [Elgg development] Rather large objects_entity table
On 4/17/12 11:32 PM, Hayden Shaw wrote:

> We have recently noticed our objects_entity table is growing to something quite large. The
> table is currently sitting around 400mb with about 500,000 entries, which matches up with

Just curious, are you using any plugin that refactors comments to be stored as objects
instead of annotations? E.g. to allow likes on/threaded comments?

Steve
--
http://www.mrclay.org/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hayden Shaw  
View profile  
 More options Apr 18 2012, 1:10 am
From: Hayden Shaw <hayden.s...@core-ed.ac.nz>
Date: Wed, 18 Apr 2012 17:10:44 +1200
Local: Wed, Apr 18 2012 1:10 am
Subject: Re: [Elgg development] Rather large objects_entity table

Hi Steve,

We aren't doing anything funky or messing with annotations or comments as a
whole but we are using a threaded discussion that we developed which uses
entities.  This obviously will add to the size of that table over time but
you could say that for any entity type.

The main problem with it being so big is the ability to search at a decent
speed.

One contributor to the size maybe the site notifications.  From what I can
tell, if you have 100 members in a group with site notifications on, and
someone uploads a file - that creates a 100 entities of the subtype
message.  Does that sound right?

Cheers Hayden

On 18 April 2012 16:33, Steve Clay <st...@mrclay.org> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kevin Jardine  
View profile  
 More options Apr 18 2012, 2:03 am
From: Kevin Jardine <kevinjard...@gmail.com>
Date: Tue, 17 Apr 2012 23:03:10 -0700 (PDT)
Local: Wed, Apr 18 2012 2:03 am
Subject: Re: Rather large objects_entity table

Two things:

a. the Elgg notification system is broken in the sense that using it with
groups of any size or even individuals with a lot of friends/followers can
break your site. I have advised some of my clients to keep it turned off.
Fixing it is supposed to be a major focus of Elgg 1.9.

b. Given that there *is* a full text index on title and description, I am
puzzled as to why a table with a size of 400mb would make your site run
slowly. That does not seem like a large table size to me. Properly indexed,
it should run fine. You are running Elgg on a dedicated server, right?

Kevin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hayden Shaw  
View profile  
 More options Apr 18 2012, 4:52 pm
From: Hayden Shaw <hayden.s...@core-ed.ac.nz>
Date: Thu, 19 Apr 2012 08:52:57 +1200
Local: Wed, Apr 18 2012 4:52 pm
Subject: Re: [Elgg development] Re: Rather large objects_entity table

Hi Kevin,

Thanks for your input on this.

We do have some fairly large groups with a large amount of notifications
set for them so I have turned off the site notifications in the interim.  I
think just having email notifications will be sufficient.  Doesn't solve
the speed issue that is existing now but next weeks job will be trying to
remove the notification entities without touching the standard user to user
messages from the database for testings sake to see if that makes a
difference at all.  However not sure if that will be possible as I don't
think there's a way to tell the differentiate them in the database.

The site works smoothly until you do a 'search' for a term that is quite
generic and common and then it seems to grind to a holt.  The slow query
log is showing it's struggling with that object table.  And yep, it's
sitting on it's own dedicated server.

Thanks again.

Cheers Hayden

On 18 April 2012 18:03, Kevin Jardine <kevinjard...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Steve Clay  
View profile  
 More options Apr 18 2012, 5:08 pm
From: Steve Clay <st...@mrclay.org>
Date: Wed, 18 Apr 2012 17:08:24 -0400
Local: Wed, Apr 18 2012 5:08 pm
Subject: Re: [Elgg development] Re: Rather large objects_entity table
On 4/18/12 2:03 AM, Kevin Jardine wrote:

> a. the Elgg notification system is broken in the sense that using it with groups of any
> size or even individuals with a lot of friends/followers can break your site. I have
> advised some of my clients to keep it turned off. Fixing it is supposed to be a major

Do you mean simply disabling the "notifications" plugin? With it off, besides the user
settings forms, what's the extend of functionality that you lose? Are e-mail notifications
still sent on new content/comments?

Is it possible to just disable "Site" notifications?

Steve
--
http://www.mrclay.org/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hayden Shaw  
View profile  
 More options Apr 18 2012, 5:15 pm
From: Hayden Shaw <hayden.s...@core-ed.ac.nz>
Date: Thu, 19 Apr 2012 09:15:36 +1200
Local: Wed, Apr 18 2012 5:15 pm
Subject: Re: [Elgg development] Re: Rather large objects_entity table

Steve - just commenting out the notification handler call in
messages/start.php seemed to do the trick.  Won't interfere with the email
notifications, they will still work.

register_notification_handler("site", "messages_site_notify_handler") -
line 50.

On 19 April 2012 09:08, Steve Clay <st...@mrclay.org> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kevin Jardine  
View profile  
 More options Apr 19 2012, 2:51 pm
From: Kevin Jardine <kevinjard...@gmail.com>
Date: Thu, 19 Apr 2012 11:51:59 -0700 (PDT)
Local: Thurs, Apr 19 2012 2:51 pm
Subject: Re: [Elgg development] Re: Rather large objects_entity table

Now that you mention it, I vaguely remember a client who found that certain
searches returned thousands of hits and that really slowed down the site.
If you can investigate the problem further and report back here I think
that would be useful. I think the problem was more in the design of the
search system rather than the table structure itself.

Kevin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Glen  
View profile  
 More options Apr 19 2012, 5:21 pm
From: Glen <glendavie...@gmail.com>
Date: Thu, 19 Apr 2012 14:21:17 -0700 (PDT)
Local: Thurs, Apr 19 2012 5:21 pm
Subject: Re: Rather large objects_entity table
Hi Kevin

Really appreciate you putting further thought into this. This has
become such an issue that we have disabled search for now and added a
google custom search in the interim. It does seem to be a problem with
searches that get lots of results. If you enter quite a narrow search
term which gets few results it isn't a problem. Below is an entry from
the mysql slow query log for one search query that took 32 seconds to
run with the very broad keyword 'discussion'. We are going to fix the
problem in the interim by deleting all the extraneous notification
objects to bring the table size down - but it would be good to resolve
the issue for the time when the table may get that big with useful
data. Hayden will do some debugging on the query next week probably -
but if you have any thoughts in advance about what to look for that
would be appreciated.

Glen

# Query_time: 32.527234  Lock_time: 0.025197 Rows_sent: 1
 Rows_examined: 808800
SET timestamp=1334791361;
SELECT count(DISTINCT e.guid) as total FROM elgg_entities e  JOIN
elgg_objects_entity oe ON e.guid = oe.guid  WHERE  (MATCH
(oe.title,oe.description) AGAINST ('+\"discussion\"' IN BOOLEAN MODE))
AND  ((e.type = 'object' AND e.subtype IN (21))) AND  (e.site_guid IN
(1)) AND (  (e.access_id IN (2)
                       OR (e.owner_guid = -1)
                       OR (
                               e.access_id = 0
                               AND e.owner_guid = -1
                       )
               ) and e.enabled='yes');

On Apr 20, 6:51 am, Kevin Jardine <kevinjard...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Hayden Shaw  
View profile  
 More options Apr 22 2012, 7:52 pm
From: Hayden Shaw <hayden.s...@core-ed.ac.nz>
Date: Mon, 23 Apr 2012 11:52:07 +1200
Local: Sun, Apr 22 2012 7:52 pm
Subject: Re: [Elgg development] Re: Rather large objects_entity table

Bit of information for anyone that is interested:

It's the MATCH on the two fields ('title' and 'description') that seems to
be killing it in our case.  Remove either of 'title' or 'description' so
it's just searching the one field and it runs much more promptly.

WHERE (MATCH(oe.title,oe.description) AGAINST ('+\"discussion\"' IN BOOLEAN
MODE))

On 20 April 2012 09:21, Glen <glendavie...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Kevin Jardine  
View profile  
 More options Apr 23 2012, 9:50 am
From: Kevin Jardine <kevinjard...@gmail.com>
Date: Mon, 23 Apr 2012 06:50:02 -0700 (PDT)
Local: Mon, Apr 23 2012 9:50 am
Subject: Re: [Elgg development] Re: Rather large objects_entity table

Is this an index key problem then? Perhaps there needs to be a full text
index key combining title and description? Any MySQL wizards around who
could look at this?

Kevin


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Steve Clay  
View profile  
 More options Apr 23 2012, 10:05 am
From: Steve Clay <st...@mrclay.org>
Date: Mon, 23 Apr 2012 10:05:19 -0400
Local: Mon, Apr 23 2012 10:05 am
Subject: Re: [Elgg development] Re: Rather large objects_entity table
On 4/23/12 9:50 AM, Kevin Jardine wrote:

> Is this an index key problem then? Perhaps there needs to be a full text index key
> combining title and description? Any MySQL wizards around who could look at this?

It already has an index with both title and descriptions columns, although it's confusing
called "title".

Steve
--
http://www.mrclay.org/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »