Subject | Database theory, help needed. |
---|---|
Author | comesailing@btinternet.com |
Post date | 2001-08-12T08:22:23Z |
Hi
I have an SQl
Select Count(column1)
From Mytable
where column2 > :A
and column3 < :B
and column4 = :D
and column1 = :E
there are say 20,000 records in Mytable.
and the result is likely to be about 25.
Given the result, how much is the speed of this sql going to depend on
1. The number of fields in Mytable ?
2. The number of records in MyTable ?
Given that the parameters A and B are known some 5 minutes in advance
of parameters D and E.
And Parameters D and E are changed by the user quite often (say 6
times in 2 minutes as his mind changes) and the query re-run, I
originally programmed to select on parameters A and B into another
table. Then selected from that much smaller table using D and E to
get the result...but I am beginning to doubt whether that was really
desirable given the overhead of the transfer to a smaller table.
Full marks will be obtained for the corect answer to one or more
questions!
Thanks in advance
Dave
I have an SQl
Select Count(column1)
From Mytable
where column2 > :A
and column3 < :B
and column4 = :D
and column1 = :E
there are say 20,000 records in Mytable.
and the result is likely to be about 25.
Given the result, how much is the speed of this sql going to depend on
1. The number of fields in Mytable ?
2. The number of records in MyTable ?
Given that the parameters A and B are known some 5 minutes in advance
of parameters D and E.
And Parameters D and E are changed by the user quite often (say 6
times in 2 minutes as his mind changes) and the query re-run, I
originally programmed to select on parameters A and B into another
table. Then selected from that much smaller table using D and E to
get the result...but I am beginning to doubt whether that was really
desirable given the overhead of the transfer to a smaller table.
Full marks will be obtained for the corect answer to one or more
questions!
Thanks in advance
Dave