After I added the reservation module, now when I open a new table to add orders to the table it hangs for about 15 seconds on my second terminal. The main terminal where the DB is installed on, it hangs for about 2 seconds. Please help, my bar terminal is really slow, during a busy it’s difficult to work.
Note: opening a table that already has orders in it, it’s normal and it opens right away.
execute this script in your sql server management studio under your database , pls do a backup first of your database before you run this sql
BEGIN TRANSACTION;
BEGIN TRY
DECLARE @ErrorMessage NVARCHAR(MAX);
DECLARE @ErrorSeverity INT;
DECLARE @ErrorState INT;
DELETE FROM dbo.Tasks;
COMMIT TRANSACTION;
END TRY
BEGIN CATCH
IF @@TRANCOUNT > 0
BEGIN
ROLLBACK TRANSACTION;
SET @ErrorMessage = ERROR_MESSAGE();
SET @ErrorSeverity = ERROR_SEVERITY();
SET @ErrorState = ERROR_STATE();
RAISERROR(@ErrorMessage, @ErrorSeverity, @ErrorState);
END;
END CATCH;
This script safely deletes all tasks from the Tasks table. If anything goes wrong during the deletion, it rolls back and reports the error.
after you are done running the script, test to see if its still slow when opening tables