I believe it's the QUERY-OPEN() that takes time. Not QUERY-PREPARE().
Your query is only performing selection (WHERE) and sort (BY) on the second table. That makes is difficult to utilize indizes. The OpenEdge ABL query engine does not support flipping the buffer-sequence. Try turning the query around:
FOR EACH estrutura WHERE ......, FIRST item-cli.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…