RT 6.0.3 repeats most recent search, even if using a direct ticket link

Hi all,

I’m testing RT 6.0.3 as a possible upgrade from our current RT 5.0.7 system. This is a test system using a snapshot of our production database.

I’m seeing behavior that may be intentional, but it has a significant performance impact for us.

If I run an expensive ticket search, for example a full-text Content LIKE 'iphone' search across all tickets, the initial search takes several seconds. After that, I return to my RT home/dashboard page. If I then click on any ticket link from the dashboard — not from the original search results page — RT appears to internally repeat the previous expensive search while loading the ticket.

In the debug log I see queries like this on ticket display:

[322445] [Wed Jul  8 18:02:14 2026] [debug]: miturria - SQL(36.865471s): SELECT *, COUNT(main.id) OVER() AS search_builder_count_all FROM (SELECT DISTINCT main.Created, main.Creator, main.Due, main.EffectiveId, main.FinalPriority, main.InitialPriority, main.IsMerged, main.LastUpdated, main.LastUpdatedBy, main.Owner, main.Priority, main.Queue, main.Resolved, main.SLA, main.Started, main.Starts, main.Status, main.Subject, main.TimeEstimated, main.TimeLeft,main.TimeWorked, main.Told, main.Type, main.id FROM Tickets main JOIN Transactions Transactions_1  ON ( Transactions_1.ObjectType = ? ) AND ( Transactions_1.ObjectId = main.id ) JOIN Attachments Attachments_2  ON ( Attachments_2.TransactionId = Transactions_1.id ) JOIN AttachmentsIndex AttachmentsIndex_3  ON ( AttachmentsIndex_3.id = Attachments_2.id )  WHERE (main.IsMerged IS NULL) AND (main.Status != ?) AND (main.Type = ?) AND ( ( MATCH(AttachmentsIndex_3.Content) AGAINST (? IN BOOLEAN MODE) AND AttachmentsIndex_3.Content IS NOT NULL ) ) ) main ORDER BY main.id ASC  LIMIT ?;  [ bound values: 'RT::Ticket' 'deleted' 'ticket' 'iphone' '1000' ] (/opt/rt6/sbin/../lib/RT/Interface/Web.pm:1687)

This repeats every time I load a ticket after performing that search, even when the ticket link I click is from the dashboard/home page rather than the search results page.

If I set:

Set($ShowSearchNavigation, 0);

the repeated search behavior goes away.

Is it expected that search navigation repeats the last ticket search even when loading a ticket from a page that is not the original search results page? If so, is there a way to limit search navigation to links actually opened from search results, or to prevent expensive full-text searches from being reused this way?

Less than a second for me. Maybe it’s because we have less than 200k tickets (only 1.5 years running).

I upgraded from 5.0.9 to 6.0.2. Now on 6.0.3.

I changed RT to debug mode in a test environment and haven’t seen that query in the log or any delay following your steps. Maybe a browser/cache/plugin issue?

Hi @miturria.

I encountered the same behavior once after running a specific search, but I could not look into the log so I don’t know there was the same entry.

Initially, it only affected my user account. However, when I shared the search URL with other users, the same issue started happening to them as well. I’d highly recommend checking if the behavior persists when other users access it.

In my case, the issue mysteriously disappeared the next day. Coincidentally, an IT colleague was performing database maintenance at the same time, so we don’t know the exact root cause and didn’t have enough time to investigate it further.

The good news is that the error hasn’t occurred again since then.

Hope this helps narrow it down!

regards
Andre.

Yes, it’s expected. The search navigation are the buttons that show quick links to first/previous/next/last. RT needs to re-run the search to find these locations. The config option you found turns off that navigation, saving the extra search.

The behavior when coming from a dashboard is a good question. You could create a ticket in our public RT and we can look more closely. You can include what you are seeing and what you expect in that context.