This is the query SQL:
select distinct lastname from vdata order by lastname
vdata has about 5 million rows, and this query returns about 6,000 rows. 2 questions:
1. How can I improve its speed? I takes about 9 seconds to run as opposed to 2 seconds when run from the MySQL Console app.
2. How can I figure out the number of rows returned by the query? I do a FetchRows but that runs the number 25.
Thanks,
Query speed and results
-
- Posts: 451
- Joined: Wed 19 Jan 2005 09:59
> 1. How can I improve its speed? I takes about 9 seconds to run as opposed
> to 2 seconds when run from the MySQL Console app.
Try to set FetchAll to False. Please read carefully MyDAC help about restrictions of this mode.
> 2. How can I figure out the number of rows returned by the query?
> I do a FetchRows but that runs the number 25.
Just set Options.QueryRecCount to True
> to 2 seconds when run from the MySQL Console app.
Try to set FetchAll to False. Please read carefully MyDAC help about restrictions of this mode.
> 2. How can I figure out the number of rows returned by the query?
> I do a FetchRows but that runs the number 25.
Just set Options.QueryRecCount to True