What's going on with our database, if explain says the total estimated time is 1 minute and 38 seconds, but the execution took more than an hour before I cancelled the query???! We're running V2R5 with Teradata Sql assistant 6.1...
The query is supposed to come back with about 30.000 records, has 5 joins to 2 moderatly big tables (500.000 rows) and 3 small (between 5 and 200 rows).
When I add a WHERE clause to come back with 1 row/unique number, it takes about 5 seconds... The weird thing is, when I fired the total query before the weekend, it would complete within a few minutes!! With the where clause added it took about 5 seconds, just like now...
If anyone could enlighten me on how to solve this, or how to check if the db isn't unstable or something, I'ld be very pleased!
The query is supposed to come back with about 30.000 records, has 5 joins to 2 moderatly big tables (500.000 rows) and 3 small (between 5 and 200 rows).
When I add a WHERE clause to come back with 1 row/unique number, it takes about 5 seconds... The weird thing is, when I fired the total query before the weekend, it would complete within a few minutes!! With the where clause added it took about 5 seconds, just like now...
If anyone could enlighten me on how to solve this, or how to check if the db isn't unstable or something, I'ld be very pleased!