I'm using following two WMI queries :
SELECT * FROM Win32_Group WHERE LocalAccount=true
SELECT Domain,Name FROM Win32_UserAccount WHERE LocalAccount=true
The 2nd query takes about 6 seconds to run (over only 4 users) whereas the 1st query takes about .3 seconds to run over 22 groups. Can somebody tell me why is there such a performance gap? And any alternative way to write the 2nd query?
EDIT:I'm running the query on a local machine, so connections should not come into the picture.