Query speed and results
Posted: Sat 28 May 2005 15:51
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,
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,