[rt-users] Finding 80 tickets; displaying only 10

Benjamin Boksa b.boksa at sidebysite.de
Sat Feb 28 17:11:36 EST 2004


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>> Case 1:
>> Current search criteria
>> Subject LIKE VIRUS
>> Queue = general
>>
>> gives me "Found 64 tickets" but no tickets are displayed.
>>
>> Case 2:
>> Current search criteria
>> Subject LIKE VIRUS
>>
>> gives me "Found 64 tickets" and 50 tickets are displayed, all of them 
>> in the cue general.
>
> Can you capture the SQL of the SELECT queries that go off to find 
> those tickets?

I used MySQL logging to log the queries executed when performing the 
searches, here they are:


Case 1:

SELECT count(main.id) FROM Tickets main  WHERE ((main.EffectiveId = 
main.id)) AND ((main.Status != 'deleted')) AND ((main.Type = 'ticket')) 
AND ( ( (main.Queue = '4') ) AND ( (main.Subject LIKE '%VIRUS%') ) )
SELECT main.* FROM Tickets main  WHERE ((main.EffectiveId = main.id)) 
AND ((main.Status != 'deleted')) AND ((main.Type = 'ticket')) AND ( ( 
(main.Queue = '4') ) AND ( (main.Subject LIKE '%VIRUS%') ) )  ORDER BY 
main.id ASC LIMIT 50

Case 2:

SELECT count(main.id) FROM Tickets main  WHERE ((main.EffectiveId = 
main.id)) AND ((main.Status != 'deleted')) AND ((main.Type = 'ticket')) 
AND ( ( (main.Subject LIKE '%VIRUS%') ) )
SELECT main.* FROM Tickets main  WHERE ((main.EffectiveId = main.id)) 
AND ((main.Status != 'deleted')) AND ((main.Type = 'ticket')) AND ( ( 
(main.Subject LIKE '%VIRUS%') ) )  ORDER BY main.id ASC LIMIT 50


(The queries log quite good to me) The complete logs with all queries 
performed on the two HTTP-Requests can be found at: 
http://www.boksa.de/tmp/sql-case{1,2}

Some information that might be useful:

- - The problem is reproducable in another queue as well
- - Only standard scrips are used
- - The version-history is RT 3.0.6 -> 3.0.8 -> 3.0.9
- - An import from 2.x (<- don't remember the exact version) was done 
after installing 3.0.6
- - All tickets in the example were created by 3.0.8 or 3.0.9
- - Perl 5.8.1 is used
- - MySQL 4.1.1 is used (as we need GIS-spatials on that machine)
- - Apache 1.3.28 is used

If you need any further information let me know what you need.

Benne
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (Darwin)

iD8DBQFAQRIbR5U9XkJXZKwRArtVAJoCtg/VAzXhCrgt/U/p2d09NQOAPgCfVSof
iB2dAKm/O53nXWzOoOjy4xw=
=LqFF
-----END PGP SIGNATURE-----




More information about the rt-users mailing list