[rt-users] RT query for test InnoDB performance

Ruslan Zakirov ruslan.zakirov at gmail.com
Wed Jan 18 15:18:47 EST 2006


On 1/18/06, Francesco Dalla Ca' <f.dallaca at cineca.it> wrote:
> Vivek Khera wrote:
>
> >
> > On Jan 17, 2006, at 5:39 PM, Ruslan Zakirov wrote:
> >
> >>> My understanding is that the above ALTER command does the moral
> >>> equivalent of a VACUUM FULL in postgres.  ie, it cleans out the dead
> >>> tuples and reclaims the unused space from the table.
> >>
> >> It's not full vacuum, it only rebuilds indexes.
> >
> >
> > You'd think they'd call this command 'REINDEX tablename' instead,
> > then.  But that'd be too obvious :-(
>
>  From mysql support:
>
>  > ALTER recreates the table as if it was DROPped and CREATEd again it
>  > updates all index statistics and "defragments" the table.
>
> A "null" ALTER TABLE (ALTER TABLE x_y_z ENGINE=InnoDB;) is a very
> expensive operation... but more effective than a ANALYZE+OPTIMIZE.
Hm, didn't know that.

>
> Regards, Francesco.
>
> p.s.: Can anyone give me a sample sql query from "Query browser"?
SELECT COUNT(DISTINCT main.id) FROM Tickets main , Links Links_1 
WHERE ((main.EffectiveId = main.id)) AND ((main.Status != 'deleted'))
AND ( ( (main.Status = 'new') OR (main.Status = 'stalled') OR
(main.Status = 'open') )  AND  (  ( (Links_1.Type = 'DependsOn') AND
(Links_1.LocalBase = '119') AND (main.id = Links_1.LocalTarget) )  )
);

SELECT main.* FROM Tickets main   WHERE ((main.EffectiveId = main.id))
AND ((main.Status != 'deleted')) AND ((main.Type = 'ticket')) AND ( ( 
( (main.Owner = '12') )  AND (main.Status = 'new') OR (main.Status =
'open') ) )  ORDER BY main.Priority DESC  LIMIT 10;

SELECT DISTINCT main.* FROM CustomFields main , ObjectCustomFields
ObjectCustomFields_1  WHERE ((ObjectCustomFields_1.ObjectId = '1') OR
(ObjectCustomFields_1.ObjectId = '0')) AND ((main.Disabled = '0')) AND
((main.LookupType = 'RT::Queue-RT::Ticket-RT::Transaction')) AND
((main.Name = NULL)) AND ((main.id =
ObjectCustomFields_1.CustomField))  ORDER BY
ObjectCustomFields_1.ObjectId ASC, ObjectCustomFields_1.SortOrder ASC;



>
> >
> > _______________________________________________
> > http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
> >
> > Be sure to check out the RT Wiki at http://wiki.bestpractical.com
> >
> > Download a free sample chapter of RT Essentials from O'Reilly Media at
> > http://rtbook.bestpractical.com
> >
> > WE'RE COMING TO YOUR TOWN SOON - RT Training in Amsterdam, Boston and
> > San Francisco - Find out more at
> > http://bestpractical.com/services/training.html
> >
>
>
> --
> --------------------------------------------------
> Francesco Dalla Ca' - Email: f.dallaca at cineca.it
> Settore Gestione Sistemi CINECA
> Via Magnanelli 6/3  40033 Casalecchio di Reno (BO)
> Bologna, Italy            Tel: 051/6171437
> http://www.cineca.it
> --------------------------------------------------
>
> _______________________________________________
> http://lists.bestpractical.com/cgi-bin/mailman/listinfo/rt-users
>
> Be sure to check out the RT Wiki at http://wiki.bestpractical.com
>
> Download a free sample chapter of RT Essentials from O'Reilly Media at http://rtbook.bestpractical.com
>
> WE'RE COMING TO YOUR TOWN SOON - RT Training in Amsterdam, Boston and
> San Francisco - Find out more at http://bestpractical.com/services/training.html
>


--
Best regards, Ruslan.


More information about the rt-users mailing list