General information
Category:
Databases,Tables, Views, Indexing and SQL syntax
>A client reported a form taking it's time to display. I replicated the issue today. And it's a report form that lists periods you can select for a financial report.
>
>I did some research and prior to the form displaying, a "Select Distinct Period..." is run on a historical transaction table to find all periods that data exists for. This appears to be what's slowing the display down.
>
>I added an index on the period column, but that doesn't have any affect. Is there any way I can optimize this, or a quicker way I can come up available periods?
>
>Thanks,
>
>PF
VFP doesn't optimize DISTINCT, GROUP BY and ORDER BY.
You can:
- uses the index into a XBASE SCAN FOR cycle ( very fast )
- uses SQL Server or an other more powerful backend
- uses a MasterTable with distinct values ( a bad solution )
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only