Hi, Kenneth!
KU> I have a query that is embedded in a scripts. The query has several
KU> parameters to query on (one table is involved). Is there a way to
KU> design a 2nd index to speedup to processes? I have a query, also in a
KU> script that list all transactions that were entered today. The process
KU> seems to get longer and longer each day. I've tried to define a
KU> secondary index on date but has not helped much. What am I doing wrong?
I saw an answer by Lance Leonard to one of your previous posts which said
what is the answer to both this question and your previous ones. Indexing
alone is NOT the answer to your problems. What you don't seem to get is that
the more complex your query, the longer Paradox will take to figure out an
answer that fits it. And as the data piles up day by day, there will be more
and more stuff for Paradox to sort through to find the records you want.
Perhaps you are new to computers and need a non-database analogy. Try
this: You have a toy box full of multi-colored children's alphabet blocks in
six different shapes, six different colors and six different sizes. If your
task is to pick out the second smallest blue five-pointed star that has the
letter 'Q' on it, you would spend a long time sorting through the shapes
before you found it. If all the blocks were sorted on racks (indexed)
alphabetically, you would take less time to find all the ones with the letter
'Q', but you would still have to figure out the other parameters, and that
would take time.
It would be far easier if you did it in steps (which Paradox can do VERY
quickly) like first separating out only the blue ones, then separating out
only the five-pointed stars from the much smaller bunch of blue ones, then
finding only the blue five-pointed stars with the letter 'Q', and then
picking
out the second smallest one of those six blocks.
Getting back to the computer and your Paradox query, you need to break it
down into several simple queries. Take advantage of the fact that computers
do
very small steps very quickly.
(You'd be amazed how many operations are involved in something as simple as
dividing one number by another.)
First do a query on just the date alone, then do a second query on the
resulting Answer table for the next item of information you need, and yet
another on that Answer table for the next item. I don't know what your query
looks like, or even what version of Paradox you are using, since you haven't
told us, but if you try the above, you'll get better results.
By the way, if you post your table structures and queries, and tell us
what
you are trying to do, we might be able to help you in ways you can't even
imagine. You'd be amazed at the total number of years of experience in
Paradox available on this echo.
\ | | /
-- Lee --
/ | | \
... There is something about every person you meet that is the first or the
best.
--- Via Silver Xpress V3.02
---------------
* Origin: Silver Xpress [RBBS] (1:125/27)
|