Re: faster search engine for fulltext search



Perhaps doing your queries to return only some instead of all records
will help, a great module for doing this is:

http://search.cpan.org/perldoc?Data::Paginate



I am using a limit clause and the sql query returns at most 20 records, but
when very many records are found, the search is very slow, even if it
returns only 20.

I know how many of them are found, because I use found_rows() in order to

perldoc -f found_rows
perldoc DBI
perldoc DBD::mysql

have no refernce to that function?

Care to reference found_rows()'s docs?

show how many records would be found if no limit clause would be used.

Depending on the DB it may or may not matter "speed"-wise(MySQl's LIMIT is much more efficient than Postgre's for example) the point for the OP was this:

pagination will help your script be faster in the sense that the array of records its working with is 20 instead of 20,000,000 (IE independant of how efficient the DB is with a proper query, which is not a perl issue in the least)

it also makes it easier to use for your end user, but thats a UI issue.
.



Relevant Pages

  • Re: DBI
    ... Problems occur when the data you insert into the SQL query contain single ... quotes (or other non-escaped special characters). ... Lookup 'perldoc DBI' for more information about bind'ing values into SQL ...
    (comp.lang.perl.misc)
  • Re: [PHP] Newbie question, Which way is best?
    ... I have a script that contains a form and a pagination routine that calls ... I want to pass an sql query along with some other variables to the ... problems successfully passing the SQL query string within the url. ...
    (php.general)
  • Re: Newbie trying to put SQL Query into a VBScript
    ... my script works great and I thank you for helping me ... run an SQL query on the database, rather than to have to log in to each ... I have a script that I'm making to help automate ...
    (microsoft.public.scripting.vbscript)
  • Re: MySQL in a for loop
    ... > works on it's own in separate script. ... > not connect to MySQL database on localhost\n"; ... > for my $messageID { ... > #SQL Query 1 HANDLE ...
    (perl.beginners)
  • Ezportal/Ztml v1.0 Multiple vulnerabilities
    ... Multiple Cross Site Scripting Vulnerabilities ... This can be used to post arbitrary HTML or web script code. ... This can be used make any SQL query by injecting arbitrary SQL code. ... Authentication Bypass Vulnerability ...
    (Bugtraq)