Discussions
Stay up-to-date with the latest news from NetSuite. You’ll be in the know about how to connect with peers and take your business to new heights at our virtual, in-person, on demand events, and much more.
Now is the time to ask your NetSuite-savvy friends and colleagues to join the NetSuite Support Community! Refer now! Click here to watch and learn more!
JOIN = loooong execution time
Just getting my hands dirty with the ODBC stuff. Started with a simple transaction query:
string sql = "SELECT t.create_date, t.transaction_id, t.transaction_type, t.status " + "FROM transactions AS t " + "WHERE t.transaction_type = 'Sales Order' AND (t.status = 'Pending Fulfillment' OR t.status = 'Pending Billing/Partially Fulfilled') " + "ORDER BY t.create_date DESC";
This executes pretty quick, about 1.5 seconds.
I then wanted to try some joins to see how they would perform.
string sql = "SELECT e.name, t.create_date, t.transaction_id, t.transaction_type, t.status " + "FROM transactions AS t " + "LEFT JOIN customers AS e ON e.customer_id = t.entity_id " + "WHERE t.transaction_type = 'Sales Order' AND (t.status = 'Pending Fulfillment' OR t.status = 'Pending Billing/Partially Fulfilled') " + "ORDER BY t.create_date DESC";
Steve Klett | Senior Developer
NetValue Technology
0