Hi Ivan,
Sometimes I have a hard time of leave the habits of developing procedures in the IdM the product behind :-) Just to illustrate some of what we do during development of the product to check performance and how much it matters even on a small set of 117 entries (and by no means is this accurate for all cases or even of importance when doing one off queries):
select mcDisplayName from idmv_entry_simple_all where mcEntryType = 'MX_PERSON'
(117 row(s) affected)
Table 'mxi_entry'. Scan count 1, logical reads 10, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
SQL Server Execution Times:
CPU time = 0 ms, elapsed time = 0 ms.
VS
select mcValue from idmv_vallink_basic where mcAttrName = 'DISPLAYNAME' and mcMSKEY in
(select mcMSKEY from idmv_vallink_basic where mcAttrName = 'MX_ENTRYTYPE' and mcsearchvalue = 'MX_PERSON')
(117 row(s) affected)
Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'mxi_link'. Scan count 4, logical reads 8, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'MXI_Attributes'. Scan count 4, logical reads 12, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
Table 'MXI_VALUES'. Scan count 2, logical reads 683, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
SQL Server Execution Times:
CPU time = 15 ms, elapsed time = 87 ms.
These are the kind of thoughts that go through the head of atleast this IdM developer when seeing queries and as such I thought I'd mention the other view :-)
Best regards
Chris (SAP IdM developer)