You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@openmeetings.apache.org by "seba.wagner@gmail.com" <se...@gmail.com> on 2012/09/22 10:24:33 UTC

FK references for organization

Hi Maxim,

I saw your last commit, still studying it :)

One thing we might should consider is using InnoDB as default, as it
supports foreign key constraints.
For example the delete Organisation cannot work, there are references
in the table "rooms_organisation".
While we are currently using MyISAM we do not recognizes it, if
switching to InnoDB or Postgres you migth immediately see that it does
not work.

We might also discuss which of the tables we are going to actually
really delete and which ones we only flag as deleted.
I think organizations can be deleted "Hard".
Further "Hard delete": configurations, ldapconfigs, servers
But it will not work for users, rooms.
It might makes sense to argue that rooms should be deletable to free
up server space cause a deleted room has assigned room files that you
might want to get rid of to free your disk. However there are also so
many other referenced tables with records that should not be deleted
at all when deleting a room record so that I doubt that it makes sense
to put time into this complexity now.

What do you think?

Sebastian
-- 
Sebastian Wagner
https://twitter.com/#!/dead_lock
http://www.webbase-design.de
http://www.wagner-sebastian.com
seba.wagner@gmail.com

Re: FK references for organization

Posted by "seba.wagner@gmail.com" <se...@gmail.com>.
I was able to adopt your sample to the "configurations" area.
It works quite well :) however there are some minor issues remaining
that will affect all admin sections:
 - "New Record" label is not hidden after save,
 - If you press delete the yellow "Loading" in the top right is shown,
if you press cancel, the yellow "Loading" stays (but there is nothing
loading at this moment)
 - If you add a new user there is no confirmation or view change, so
you actually do not know if the new record was saved successfully or
not. I would suggest adding the total numbers of records on the bottom
of every table, if you add a new one, the number will increase by +1
and you got your confirmation that the add operation was done.

I will try to complete some of the other admin sections.

Sebastian

2012/9/22 seba.wagner@gmail.com <se...@gmail.com>:
> Hi Maxim,
>
> I saw your last commit, still studying it :)
>
> One thing we might should consider is using InnoDB as default, as it
> supports foreign key constraints.
> For example the delete Organisation cannot work, there are references
> in the table "rooms_organisation".
> While we are currently using MyISAM we do not recognizes it, if
> switching to InnoDB or Postgres you migth immediately see that it does
> not work.
>
> We might also discuss which of the tables we are going to actually
> really delete and which ones we only flag as deleted.
> I think organizations can be deleted "Hard".
> Further "Hard delete": configurations, ldapconfigs, servers
> But it will not work for users, rooms.
> It might makes sense to argue that rooms should be deletable to free
> up server space cause a deleted room has assigned room files that you
> might want to get rid of to free your disk. However there are also so
> many other referenced tables with records that should not be deleted
> at all when deleting a room record so that I doubt that it makes sense
> to put time into this complexity now.
>
> What do you think?
>
> Sebastian
> --
> Sebastian Wagner
> https://twitter.com/#!/dead_lock
> http://www.webbase-design.de
> http://www.wagner-sebastian.com
> seba.wagner@gmail.com



-- 
Sebastian Wagner
https://twitter.com/#!/dead_lock
http://www.webbase-design.de
http://www.wagner-sebastian.com
seba.wagner@gmail.com

Re: FK references for organization

Posted by Alexei Fedotov <al...@gmail.com>.
Cool, thank you, Maxim, for investigation
23.09.2012 10:35 пользователь "Maxim Solodovnik" <so...@gmail.com>
написал:

> correction:
> InnoDB results:
> initial lang import == 56 sec; subsequent import == 0/1 sec   (Empty
> dropped/created DB)
> initial lang import == 3 sec; subsequent import == 0/1 sec     (Values were
> re-added to existent DB)
>
>
> On Sun, Sep 23, 2012 at 1:32 PM, Maxim Solodovnik <solomax666@gmail.com
> >wrote:
>
> > Hello Sebastian,
> >
> > <property name="openjpa.jdbc.DBDictionary"
> >  value="batchLimit=100,tableType=myisam"/>
> > was added to mysql_persistence.xml to speed up things.
> > While Vasily did migration from Hibernate to JPA he report the
> performance
> > degradation.
> > I did investigate this and found this is because of InnoDB used by
> default.
> >
> > Initial language import was significally slower.
> >
> > My current results are
> > MyISAM: initial lang import == 9 sec; subsequent import == 0/1 sec
> > InnoDB: initial lang import == 3 sec; subsequent import == 0/1 sec
> >
> > was measured with
> > ./admin.sh -l
> >
> > Surprisingly right now InnoDB was faster, can you recheck these results
> on
> > your machines?
> >
> > I would vote for hard delete of everything or add option to restore/purge
> > deleted things.
> > Currently it will be hard to implement cascade delete since our object
> > structure is not good for it (all object need  to have references to
> > connected entities, we have "Long ref_id" instead :( )
> >
> >
> > On Sat, Sep 22, 2012 at 3:24 PM, seba.wagner@gmail.com <
> > seba.wagner@gmail.com> wrote:
> >
> >> Hi Maxim,
> >>
> >> I saw your last commit, still studying it :)
> >>
> >> One thing we might should consider is using InnoDB as default, as it
> >> supports foreign key constraints.
> >> For example the delete Organisation cannot work, there are references
> >> in the table "rooms_organisation".
> >> While we are currently using MyISAM we do not recognizes it, if
> >> switching to InnoDB or Postgres you migth immediately see that it does
> >> not work.
> >>
> >> We might also discuss which of the tables we are going to actually
> >> really delete and which ones we only flag as deleted.
> >> I think organizations can be deleted "Hard".
> >> Further "Hard delete": configurations, ldapconfigs, servers
> >> But it will not work for users, rooms.
> >> It might makes sense to argue that rooms should be deletable to free
> >> up server space cause a deleted room has assigned room files that you
> >> might want to get rid of to free your disk. However there are also so
> >> many other referenced tables with records that should not be deleted
> >> at all when deleting a room record so that I doubt that it makes sense
> >> to put time into this complexity now.
> >>
> >> What do you think?
> >>
> >> Sebastian
> >> --
> >> Sebastian Wagner
> >> https://twitter.com/#!/dead_lock
> >> http://www.webbase-design.de
> >> http://www.wagner-sebastian.com
> >> seba.wagner@gmail.com
> >>
> >
> >
> >
> > --
> > WBR
> > Maxim aka solomax
> >
>
>
>
> --
> WBR
> Maxim aka solomax
>

Re: FK references for organization

Posted by "seba.wagner@gmail.com" <se...@gmail.com>.
I think InnoDB has improved a lot since Oracle aquired MySQL.
We could default to InnoDB again.

Sebastian

2012/9/23 Maxim Solodovnik <so...@gmail.com>:
> correction:
> InnoDB results:
> initial lang import == 56 sec; subsequent import == 0/1 sec   (Empty
> dropped/created DB)
> initial lang import == 3 sec; subsequent import == 0/1 sec     (Values were
> re-added to existent DB)
>
>
>
> On Sun, Sep 23, 2012 at 1:32 PM, Maxim Solodovnik <so...@gmail.com>
> wrote:
>>
>> Hello Sebastian,
>>
>> <property name="openjpa.jdbc.DBDictionary"
>> value="batchLimit=100,tableType=myisam"/>
>> was added to mysql_persistence.xml to speed up things.
>> While Vasily did migration from Hibernate to JPA he report the performance
>> degradation.
>> I did investigate this and found this is because of InnoDB used by
>> default.
>>
>> Initial language import was significally slower.
>>
>> My current results are
>> MyISAM: initial lang import == 9 sec; subsequent import == 0/1 sec
>> InnoDB: initial lang import == 3 sec; subsequent import == 0/1 sec
>>
>> was measured with
>> ./admin.sh -l
>>
>> Surprisingly right now InnoDB was faster, can you recheck these results on
>> your machines?
>>
>> I would vote for hard delete of everything or add option to restore/purge
>> deleted things.
>> Currently it will be hard to implement cascade delete since our object
>> structure is not good for it (all object need  to have references to
>> connected entities, we have "Long ref_id" instead :( )
>>
>>
>> On Sat, Sep 22, 2012 at 3:24 PM, seba.wagner@gmail.com
>> <se...@gmail.com> wrote:
>>>
>>> Hi Maxim,
>>>
>>> I saw your last commit, still studying it :)
>>>
>>> One thing we might should consider is using InnoDB as default, as it
>>> supports foreign key constraints.
>>> For example the delete Organisation cannot work, there are references
>>> in the table "rooms_organisation".
>>> While we are currently using MyISAM we do not recognizes it, if
>>> switching to InnoDB or Postgres you migth immediately see that it does
>>> not work.
>>>
>>> We might also discuss which of the tables we are going to actually
>>> really delete and which ones we only flag as deleted.
>>> I think organizations can be deleted "Hard".
>>> Further "Hard delete": configurations, ldapconfigs, servers
>>> But it will not work for users, rooms.
>>> It might makes sense to argue that rooms should be deletable to free
>>> up server space cause a deleted room has assigned room files that you
>>> might want to get rid of to free your disk. However there are also so
>>> many other referenced tables with records that should not be deleted
>>> at all when deleting a room record so that I doubt that it makes sense
>>> to put time into this complexity now.
>>>
>>> What do you think?
>>>
>>> Sebastian
>>> --
>>> Sebastian Wagner
>>> https://twitter.com/#!/dead_lock
>>> http://www.webbase-design.de
>>> http://www.wagner-sebastian.com
>>> seba.wagner@gmail.com
>>
>>
>>
>>
>> --
>> WBR
>> Maxim aka solomax
>
>
>
>
> --
> WBR
> Maxim aka solomax



-- 
Sebastian Wagner
https://twitter.com/#!/dead_lock
http://www.webbase-design.de
http://www.wagner-sebastian.com
seba.wagner@gmail.com

Re: FK references for organization

Posted by Maxim Solodovnik <so...@gmail.com>.
correction:
InnoDB results:
initial lang import == 56 sec; subsequent import == 0/1 sec   (Empty
dropped/created DB)
initial lang import == 3 sec; subsequent import == 0/1 sec     (Values were
re-added to existent DB)


On Sun, Sep 23, 2012 at 1:32 PM, Maxim Solodovnik <so...@gmail.com>wrote:

> Hello Sebastian,
>
> <property name="openjpa.jdbc.DBDictionary"
>  value="batchLimit=100,tableType=myisam"/>
> was added to mysql_persistence.xml to speed up things.
> While Vasily did migration from Hibernate to JPA he report the performance
> degradation.
> I did investigate this and found this is because of InnoDB used by default.
>
> Initial language import was significally slower.
>
> My current results are
> MyISAM: initial lang import == 9 sec; subsequent import == 0/1 sec
> InnoDB: initial lang import == 3 sec; subsequent import == 0/1 sec
>
> was measured with
> ./admin.sh -l
>
> Surprisingly right now InnoDB was faster, can you recheck these results on
> your machines?
>
> I would vote for hard delete of everything or add option to restore/purge
> deleted things.
> Currently it will be hard to implement cascade delete since our object
> structure is not good for it (all object need  to have references to
> connected entities, we have "Long ref_id" instead :( )
>
>
> On Sat, Sep 22, 2012 at 3:24 PM, seba.wagner@gmail.com <
> seba.wagner@gmail.com> wrote:
>
>> Hi Maxim,
>>
>> I saw your last commit, still studying it :)
>>
>> One thing we might should consider is using InnoDB as default, as it
>> supports foreign key constraints.
>> For example the delete Organisation cannot work, there are references
>> in the table "rooms_organisation".
>> While we are currently using MyISAM we do not recognizes it, if
>> switching to InnoDB or Postgres you migth immediately see that it does
>> not work.
>>
>> We might also discuss which of the tables we are going to actually
>> really delete and which ones we only flag as deleted.
>> I think organizations can be deleted "Hard".
>> Further "Hard delete": configurations, ldapconfigs, servers
>> But it will not work for users, rooms.
>> It might makes sense to argue that rooms should be deletable to free
>> up server space cause a deleted room has assigned room files that you
>> might want to get rid of to free your disk. However there are also so
>> many other referenced tables with records that should not be deleted
>> at all when deleting a room record so that I doubt that it makes sense
>> to put time into this complexity now.
>>
>> What do you think?
>>
>> Sebastian
>> --
>> Sebastian Wagner
>> https://twitter.com/#!/dead_lock
>> http://www.webbase-design.de
>> http://www.wagner-sebastian.com
>> seba.wagner@gmail.com
>>
>
>
>
> --
> WBR
> Maxim aka solomax
>



-- 
WBR
Maxim aka solomax

Re: FK references for organization

Posted by Maxim Solodovnik <so...@gmail.com>.
Hello Sebastian,

<property name="openjpa.jdbc.DBDictionary"
 value="batchLimit=100,tableType=myisam"/>
was added to mysql_persistence.xml to speed up things.
While Vasily did migration from Hibernate to JPA he report the performance
degradation.
I did investigate this and found this is because of InnoDB used by default.

Initial language import was significally slower.

My current results are
MyISAM: initial lang import == 9 sec; subsequent import == 0/1 sec
InnoDB: initial lang import == 3 sec; subsequent import == 0/1 sec

was measured with
./admin.sh -l

Surprisingly right now InnoDB was faster, can you recheck these results on
your machines?

I would vote for hard delete of everything or add option to restore/purge
deleted things.
Currently it will be hard to implement cascade delete since our object
structure is not good for it (all object need  to have references to
connected entities, we have "Long ref_id" instead :( )

On Sat, Sep 22, 2012 at 3:24 PM, seba.wagner@gmail.com <
seba.wagner@gmail.com> wrote:

> Hi Maxim,
>
> I saw your last commit, still studying it :)
>
> One thing we might should consider is using InnoDB as default, as it
> supports foreign key constraints.
> For example the delete Organisation cannot work, there are references
> in the table "rooms_organisation".
> While we are currently using MyISAM we do not recognizes it, if
> switching to InnoDB or Postgres you migth immediately see that it does
> not work.
>
> We might also discuss which of the tables we are going to actually
> really delete and which ones we only flag as deleted.
> I think organizations can be deleted "Hard".
> Further "Hard delete": configurations, ldapconfigs, servers
> But it will not work for users, rooms.
> It might makes sense to argue that rooms should be deletable to free
> up server space cause a deleted room has assigned room files that you
> might want to get rid of to free your disk. However there are also so
> many other referenced tables with records that should not be deleted
> at all when deleting a room record so that I doubt that it makes sense
> to put time into this complexity now.
>
> What do you think?
>
> Sebastian
> --
> Sebastian Wagner
> https://twitter.com/#!/dead_lock
> http://www.webbase-design.de
> http://www.wagner-sebastian.com
> seba.wagner@gmail.com
>



-- 
WBR
Maxim aka solomax