Hello.
I will see if I can give you some more data, but I can't actually share my whole DB.
I won't be easy for me to share much.
It would be nice if we could avoid creating a DB for you to use.
But perhaps this helps:
When changing this query:

- St_0.png (94.16 KiB) Viewed 4435 times
...into this:

- St_1.png (114.54 KiB) Viewed 4435 times
...the problem appears (infinite and identical queries are being sent to the DB).
The only change to the query is the circled area.
How can this affect your library?
Could the query fail and your library try to re-send the query? (however, I have tried the query in SQL Server and it seems to be working...)
Also, I have noticed this: the query that has the problem, only has problem when I use a parameter
@Sender='%%'. If I use a non-empty string like
@Sender='%abc%' there is no problem:
No problem here:
WHERE (dc.IdWorkflow=3 OR dc.IdWorkflow=4) AND (dc.Status=1 OR dc.Status=11) AND
doc.IssueDate>=@FromDate AND doc.IssueDate<=@ToDate AND
ptc.IdOrgGroup=@grpID AND doc.IdDocumentKind IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16) AND
COALESCE(dc.Sender,@EmptyStr) LIKE @Sender
ORDER BY doc.IssueDate DESC
',@grpID=1,@FromDate='2009-12-01',@ToDate='2013-12-20',@usrID=1,@Sender='%gj%',@EmptyStr=' '
select @p1
Problem appears here:
WHERE (dc.IdWorkflow=3 OR dc.IdWorkflow=4) AND (dc.Status=1 OR dc.Status=11) AND
doc.IssueDate>=@FromDate AND doc.IssueDate<=@ToDate AND
ptc.IdOrgGroup=@grpID AND doc.IdDocumentKind IN (1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16) AND
COALESCE(dc.Sender,@EmptyStr) LIKE @Sender
ORDER BY doc.IssueDate DESC
',@grpID=1,@FromDate='2009-12-01',@ToDate='2013-12-20',@usrID=1,@Sender='%%',@EmptyStr=' '
select @p1
I don't know what is going on here.
For the momment I will try to fix it by changing the query, but it would be great if you could see how can this happen.