Extracting data from Teradata to Shiny app

Hi all,

I am trying to build a shiny app to automate the data extraction process as my team members are still struggling with SQL queries and this will minimise the error simultaneously. I'm with the statistical background so please bear with me if my understanding in cs is shallow.

When I use to Rstudio to wrangle the data, I usually connect to teradata using ocdc() and dbConnect.

8 second or even less taking script in teradata or Rstudio takes more than an hour running in Shiny(it's still running...)

I would like to know why it is processing simple codes this slowly and if there's any alternative function I can use.

Thank you for your help in advance!