0

I have a WMI query that is SELECT * FROM win32_printer where name = 'My Printer'

It's running as a local query.

I'm testing it through WBEMTest and through the code written in C# and in all cases on a specific machine it is really slow (~1 minute). I've checked the WMI Activity trace logs and there are no errors. Does anyone have any more hints on how to find out the problem for this specific machine.

probably at the beach
  • 14,489
  • 16
  • 75
  • 116

1 Answers1

2

WMI is slow as it is mainly designed for management not performance. There are a lot of things that happen in the background when calling a WMI query. Also queries that return a lot of data entries are slow, however in your particular query I hardly believe that is an issue.

You can check this blog post for ways to improve your query performance.

Zaid Amir
  • 4,727
  • 6
  • 52
  • 101