I'm having trouble loading datatables through an odbc connection. I haven't used Stata's odbc functionality much, so not sure if my issue is with how I'm using Stata or with my database server. I have successfully loaded a couple of smallish tables, but when I go to load large tables (~30million x 100) it gets infinitely stuck in loading mode, even if I limit the pull to a handful of rows. For example, the below code should pull the first five rows of the data table (there are about 100 columns). I've let it run for up to 12 hours (with an onsite LAN connection to the server) without any success. I'm guessing it's still running through all 30million rows to find _n<=5, but not sure why that would be. I'm using Stata 17 MP on a Windows 10 machine with a high-end processor, 64MBs of RAM, and ample storage. Loading similar sized data using other methods is usually pretty quick. Is there a better way to get this odbc data loaded? All suggestions appreciated.
Code:
odbc load in 1/5, table("databse.table") clear noquote
Comment