Bobcares

How to Reduce Windows.edb Huge File Size?

by | Oct 25, 2020

You can reduce the Windows.edb size differently, including defragmenting, removing, re-creating, and moving the windows.edb file into another drive, and so on.

Here at Bobcares, we have seen several such Windows-related queries as part of our Server Management Services for web hosts and online service providers.

Today, we’ll take a look at how to reduce windows.edb size.

 

How to reduce Windows.edb huge File Size

The Windows.edb is a database file of the Windows Search index. It mainly provides content indexing, property caching, and search results for files, e-mail, and other content.

The indexing process is done in the background using the SearchIndexer.exe process. So ,the size of the Windows.edb file increases when there are more files in the system.

By default, the Windows.edb file is located in the below path.

C:\ProgramData\Microsoft\Search\Data\Applications\Windows\Windows.edb

Here is the PowerShell command to check the current size of the Windows.edb file.

((Get-Item $env:programdata’\Microsoft\Search\Data\Applications\Windows\Windows.edb’).length/1GB)

 

Now let’s take a look at how our Support Engineers reduce the file size of Windows.edb file.

 

1. How to Reset and Rebuild the Windows Search Index

This is one of the most appropriate, though not too effective, ways to reduce the size of Windows.edb. This involves re-indexing the files in the system.

To do it, first, open Control Panel >> Indexing Options >> Advanced >> click Rebuild (to open this dialog box, run the following command: Control srchadmin.dll ).

Within a few minutes, the Windows Search will complete a full reindex of the data on the system drive. This will reduce the size of the edb file.

 

2. Reduce Windows.edb size using Defragmentation

The EDB database can be defragmented using the standard tool for maintaining such databases, esentutl.exe. You need to defragment the database offline. so first, stop the Windows Search service. Then run the below bat/cmd script.

sc config wsearch start=disabled
sc stop wsearch
esentutl.exe /d %ProgramData%\Microsoft\Search\Data\Applications\Windows\Windows.edb
sc config wsearch start=delayed-auto
sc start wsearch

Make a note that you have enough space in the hard drive, as a copy of the EDB file is created in it.

 

3. Remove and Recreate the Windows.edb file

You can safely delete the Windows.edb file if the free disk space is critical. It is safe because you don’t lose any data, instead only the search index is reset.

In order to delete the Windows.edb file, stop the Windows Search service, then delete the file and start the service.

net stop "Windows Search"
REG ADD "HKLM\SOFTWARE\Microsoft\Windows Search" /v SetupCompletedSuccessfully /t REG_DWORD /d 0 /f
del %PROGRAMDATA%\Microsoft\Search\Data\Applications\Windows\Windows.edb
net start "Windows Search"

Once you restart the Windows Search, it will start the background reindexing process and recreate the Windows.edb file.

 

4. Moving the Windows.edb file into a Different Drive

If the Windows.edb file size is growing constantly, then it is better to move the index database of Windows Search to another drive. So, if there is an increase in the search database, it won’t cause the OS to crash.

So to change the index file location, go to Control Panel >> Indexing Options >> Advanced >> Index location >> New Location, and specify the path to the new location of Windows.edb file, and click Ok.

Now restart the Windows Search service.

Restart-Service search

 

5. Modify Indexed Locations

By selectively choosing which locations to index, we can significantly reduce the size of the Windows.edb file. This is useful for excluding large files or folders that are not frequently searched. 

Follow these steps to modify indexed locations:

  1. First,  press the Windows key on the keyboard or click on the Start menu and select Settings (the gear icon).
  2. Then, click Search in the Settings window and click on Search.
  3. Now, scroll down to find and click on Advanced indexing options under the “More Search Indexer Settings” section.
  4. In the pop-up Indexing Options window, we will see a list of currently indexed locations.
  5. Then, click on the Modify button. A new window will appear, showing all available locations for indexing.
  6. Here, we can check or uncheck various folders and drives. Uncheck any locations that need not be indexed, such as large folders or specific file types (e.g., PST files from Outlook).
  7. After making your selections, click OK to save the changes.
  8. Then click Close in the Indexing Options window.

 

By following these steps, we can prevent unnecessary data from being included in the index, thus keeping the Windows.edb file smaller.

6. Use the Windows Search and Indexing Troubleshooter

If we notice that the Windows.edb file continues to grow despite your efforts, running the built-in troubleshooter can help identify and fix underlying issues with the search service. Follow these steps to run Troubleshooter:

  1. First, open Run Dialog.
  2. Then, enter the following command and press Enter:

    msdt.exe -ep SystemSettings_Troubleshoot_L2 -id SearchDiagnostic

  3. Now, follow the prompts provided by the troubleshooter to select issues related to search or indexing performance.
  4. The tool will attempt to identify and resolve any problems affecting your search functionality.

 

Using this tool can help restore normal functionality and optimize the indexing process.

7. Limit Outlook Indexing

Using Microsoft Outlook may contribute significantly to the size of our Windows.edb file, especially if it indexes PST files. Limiting Outlook indexes can prevent excessive growth of the database. Follow these steps to limit Outlook Indexing:

    1. First, open the Control Panel.
  1. Then, click on Indexing Options.
  2. Click on the Modify button.
  3. In the list of indexed locations, uncheck Microsoft Outlook if it is checked.
  4. Finally, click OK, then close out of Indexing Options. This will stop Outlook data from being included in the index, which can greatly reduce the size of Windows.edb.

8. Regular Maintenance

Establishing a routine for managing our indexing settings can help maintain a manageable Windows.edb file size over time. Regularly check which items are indexed and adjust as necessary based on our usage patterns.

 

[Need any further assistance in fixing Windows errors? – We are here to help you]

 

Conclusion

In short, you can reduce windows.edb size differently, including defragmenting, removing, re-creating, and moving the windows.edb file into another drive, and so on. Today, we saw all these ways to reduce the file size provided by our Support Engineers.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

var google_conversion_label = "owonCMyG5nEQ0aD71QM";

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Never again lose customers to poor
server speed! Let us help you.