Sample Header Ad - 728x90

create procedure function as alternative to DB timeout

0 votes
0 answers
80 views
So I am fairly new to sql and there is a particular query I make where the DB always timeout. I tried everything, including restarting the server. There is this table where it listed all the events happening in an app, together with the person_role and the platform version it happened. So an example columnns and rows would be: platform_id | aggregate_id | job_id | creator_id | event_type | timestamp | client | role | app_version| so for example if I want to just check all the events associated with a particular job_id Ill just use a WHERE statement. Also take note that when I query other tables, there is no timeout, just this particular table. I tried asking around and somebody recommended a stored procedure function to make the query faster. I tried it and actually it is just an empty table. Any other suggestions? This is the simple query : SELECT * FROM db.events WHERE job_id = '1234566677' To know all the events associated with that particular job_id.
Asked by orrie881 (1 rep)
Jan 22, 2023, 07:37 PM
Last activity: Jan 22, 2023, 08:38 PM