It is not possible to run shell scripts, install other software, or do any kind of serious administrative tasks on Amazon RDS.
In an RDS environment, you're completely isolated from the operating system and from administration of the actual system that is running MySQL for you. Your RDS instance is an opaque black box that you can only communicate with via the MySQL command line client, and even that is not likely to be what you think it is.
I was able to connect to RDS with shell command line from MySQL.
That's good, but that's not the same thing as being at a "command shell" or "command prompt" on the underlying server, which is where you would need to be to install DBT2 or any other utility, and this is not allowed with RDS.
The mysql
command line client is, fundamentally, just a tool that allows you to craft queries, issue them to the server, and see the responses. The underlying protocol is exactly the same protocol that your applications use to issue queries and retrieve results from the server. What it can do isn't all that different than connecting with Workbench, Query Browser, Toad, HeidiSQL, or any other graphical MySQL administrative tool. It just isn't graphical.
So far i have 'cd' to directory where files for dbt2 are located.
If you are saying you have 'cd' into a directory on the RDS instance, then, no, you haven't. That's not possible. Perhaps on your local machine, which explains why you are seeing a Windows error message.
C:\Users\Sqlbot>./configure
'.' is not recognized as an internal or external command,
operable program or batch file.
I am a big fan of AWS, a huge fan of MySQL (of course), but not as much of RDS, because I do not generally see being "relieved" of the "burden" of administering my systems as a positive thing, and I don't like the things I am restricted from doing. On the other hand, I am moving forward with plans to migrate some of my production systems to RDS -- but only the systems that with more mundane database requirements, systems which don't leverage some of the more creative things I do with MySQL.
But I don't want my comments to be taken as anti-RDS. I realize that to provide a managed, hosted service like they are doing, they have little choice but to lock things down... I just wish some things weren't locked down quite so tightly. My solution so far is to run MySQL on EC2 and set it up myself, but I digress.
If you are trying to learn to administer MySQL (in depth) and Linux (at all), RDS will severely limit you.
You are using a scalar function in your WHERE clause, which means that function needs to be called multiple times. You should consider calling that function once (since you already know the values of @N and @Ticker) at the start of the script to return the scalar and then pass that scalar in as a variable. While not perfect, this should reduce the multiple calls that is likely slowing down your query. A low-end RDS box is sharing resources and it's quite possible that you are spinning more CPU ticks than necessary.
DISCLAIMER: I WORK FOR SOLARWINDS
We have a product (Solarwinds Database Performance Analyzer) that can monitor your RDS instance and help troubleshoot performance issues such as this.
Best Answer
The RDS Postgres instance has a parameter group. Check in RDS colsole what parameter group is defined: RDS -> Databases -> choose your db -> Configuration -> parameter group. If it's the default one, create a new one and change
track_activity_query_size
to the value you need. Apply the new parameter group or change the actual one. The parameter is static so a restart is needed in any case.Check this link for more details, please: https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/USER_WorkingWithParamGroups.html