Hi Raymond,
We can find out the type of key_value as well as key's id at query
form creation time.
IMO, this would render key_table unnecessary in all joins.
We could even cache the form itself...
I believe the next thing required is index on key_value_{int,string}
tables: (key_id, value, system_id)this is necessary as we are looking
for key's with certain values (==) or in certain range and these are
the most common operations and the key_value_* tables are out largest.
However, this is enough for separate Ticket.
I made some experiments with RHTS and indexing fields boosted
performance in order of magnitudes -
https://engineering.redhat.com/rt3/Ticket/Display.html?id=49438
I believe Beaker would benefit from indexing as well.
If you are the DB man we are looking for it would be great!
Cheers,
-- Marian
On 11/10/2009 10:32 PM, Raymond Mancy wrote:
> ----- Original Message -----
> From: "Bill Peck"<bpeck(a)redhat.com>
> To: "Raymond Mancy"<rmancy(a)redhat.com>, "List for the
development of
> the Beaker project"<beaker-devel(a)lists.fedorahosted.org>
> Sent: Wednesday, November 11, 2009 5:22:43 AM GMT +10:00 Brisbane
> Subject: Ticket 55
>
>
> Hi Raymond,
>
> I checked out ticket55 branch and tried it out. Couple observations..
>
> 1) can we have it hide the Keyvalue pull down when Key/Value is not
> selected? Hide the pull down and the title as well. :-)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> I was perplexed because I had already put this in...I just did a diff
> though and realised I had forgotten to commit the template file.
> That's done now, and it should be displaying the correct behaviour
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> 2) the composite Key_Value_String / Key_Value_Int causes a serious
> performance issue.
>
> It preloads every Value for every key.. so the following code took over
> 2 minutes on my laptop..
>
> @classmethod
> def get_all_keys(cls):
> all_keys = cls.query()
> return [key.key_name for key in all_keys]
>
> I looked to see if there was some way to delay the loading but I
> couldn't find any. Can you make the code work without the composite?
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>
> Hmm, possibly I can get it to work without the composite. I'm not
> sure exactly how, but either way, we can't live with that kind of
> performance hit.
>
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> p.s. - reply to the beaker-devel list.. I'm trying to keep all
> communication on the list. :-)
> _______________________________________________
> Beaker-devel mailing list
> Beaker-devel(a)lists.fedorahosted.org
>
https://fedorahosted.org/mailman/listinfo/beaker-devel