Solved

too slow

Posted on 2002-05-28
2
203 Views
Last Modified: 2010-03-05
hi,

I am using perl dbi to connect to mysql and get the number of rows of a table using the following code:

$sql2=qq{select * from tutorf};
$sth2=$DBH->prepare($sql2);
$sth2->execute();
$row2=$sth2->rows();
$sth2->finish;

there is total 8000 rows in the table.
The problem is the speed of this code is very slow!!!

any method i can speed up it?
0
Comment
Question by:klnhk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 4

Accepted Solution

by:
dda earned 50 total points
ID: 7038965
'select count(*) from table' will go.
0
 
LVL 8

Expert Comment

by:inq123
ID: 9512423
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

Accept a comment by dda

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

inq123
EE Cleanup Volunteer
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Perl output collect 7 69
Perl script not writing to .csv file 6 115
Move Function in Perl Script 2 74
Perl Write to Specific line in a file 15 112
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question