If you only need to know the location and distance then use the OD Cost Matrix solver. But if you need the actual route to be shown then continue to use Closest Facility.
To solve your problem of finding ONE closest hospital, set a cutoff distance or time, say 60 miles or 60 minutes.
(i.e.. what ever is reasonable in your case).
Turn off hierarchy.
Set number of facilities to find as 1.
Solve.
it should work with 50,000 incidents and 10,000 facilities.
If it does not, can you report back to how far it gets or what error message is reported.
Also, If you are using these points over and over again, I will suggest that you run the GP tool, Calculate Locations on your hospitals and patients so that you can load them by network locations (not geometry) into a new network layer.
Jay Sandhu
If I understand your objective correctly, you want to find the driving distance from one specific origin to one specific destination, not from all origins to all destinations. This is important because, at first glance, you might think the OD cost matrix solver would work best, but actually it's probably best to do the following using a route layer instead:
1. On your dataset, create a new field named RouteName and calculate its value so that it is the same value as your current ID field.
2. Add your origins to ArcMap as a layer. (Tip: File > Add Data > Add XY Data.) Only specify the origin X and Y fields.
3. Rename the output layer that appears in the table of contents to something like Origins.
4. Add your destinations to ArcMap as a layer. Only specify the destination X and Y fields.
5. Rename the output layer to Destinations.
6. Make a Route layer using the Network Analyst toolbar (or a GP tool).
7. Load the Origins layer into the Stops class. (Tip: Right-click Stops in the Network Analyst window and choose Load Locations.) Make sure the RouteName field is mapped to the RouteName field you created.
8. Load the Destinations layer into the Stops class using the same method.
9. Solve
By specifying the route name when loading, the stops are grouped together and routes are calculated only for the stops that are in the same group, which in your case is limited to a single origin and destination pair.
You can open, and optionally export, the Routes class, which contains the calculated shortest-path driving distances. The Name field values will match the values of your original IDs.
If I understand your objective correctly, you want to find the driving distance from one specific origin to one specific destination, not from all origins to all destinations. This is important because, at first glance, you might think the OD cost matrix solver would work best, but actually it's probably best to do the following using a route layer instead:
1. On your dataset, create a new field named RouteName and calculate its value so that it is the same value as your current ID field.
2. Add your origins to ArcMap as a layer. (Tip: File > Add Data > Add XY Data.) Only specify the origin X and Y fields.
3. Rename the output layer that appears in the table of contents to something like Origins.
4. Add your destinations to ArcMap as a layer. Only specify the destination X and Y fields.
5. Rename the output layer to Destinations.
6. Make a Route layer using the Network Analyst toolbar (or a GP tool).
7. Load the Origins layer into the Stops class. (Tip: Right-click Stops in the Network Analyst window and choose Load Locations.) Make sure the RouteName field is mapped to the RouteName field you created.
8. Load the Destinations layer into the Stops class using the same method.
9. Solve
By specifying the route name when loading, the stops are grouped together and routes are calculated only for the stops that are in the same group, which in your case is limited to a single origin and destination pair.
You can open, and optionally export, the Routes class, which contains the calculated shortest-path driving distances. The Name field values will match the values of your original IDs.