Select question


Posted on 16th Feb 2014 07:03 pm by admin

Hi,

First I would like to say that php is pretty new for me..
so please don't shoot me if this should be a stupid question!

But I'm a little surpized due to following..

I have a search script (very large mysql db) which is working pretty fast for searching!
I'm using following querry:
Code: $q="SELECT `url`,`caption`, `type`,`fsize`, MATCH (caption) AGAINST ('$kwd2') as score,`source`, `lastcheck`, `dateadded`, `desc`, `media`, `filename`, `sname`, `rating`, `stream`, `id` FROM `v2links` WHERE MATCH (caption) AGAINST ('$kwd2')$stype $fxtype $fxmedia $fsort LIMIT $start,$search_count";sample: http://www.filemirrors.info

Now I would like to display the 30 latest records using following querry:
Code: $q="SELECT `url`,`caption`, `type`, `id`,`fsize`,`source`, `lastcheck`, `dateadded`, `desc`, `media`, `filename`, `sname`, `rating`, `stream`, `id` FROM `v2links` Where checked=1 $stype $fxtype $fxmedia $fsort LIMIT 30";sample: http://www.filemirrors.info/latest.html

Now it seems to take much more time (3x) to display the last 30 records then when using the searchbox and enter a keyword...

I thought a simple select should be going faster then match against a keyword?
Is there an explenation for this or am I missing something?

Thanks

No comments posted yet

Your Answer:

Login to answer
275 Like 38 Dislike
Previous forums Next forums
Other forums

Please help with SMTP Authenticated PHP Email Form
Hello, I'm creating a PHP email form, and for this particular server, I have to use SMTP Authenticat

the problem with str_replace
$str="hahahahahahahahahahahahahaha";
$nn=1;
$str=str_replace('ha','MyGod',$str,$nn);

How to generate a random array of integers subject to a certain constraint
I am writing a program that asks the user to enter an integer N and then generates a random array of

PHP File Upload Problem
Hi, I have written a very simple file upload script but it fails for reasons I can't explain. Hope

Unexpected T_Variable ?
Hi all,
I dont really know what I am doing!! I know I'm doing something wrong, and I know its on

php problem?
I don't think I'm stupid, but maybe I am.

I am working on a sit for a friend I am try to put

Replacing a string on click of a button
Hi! Is there a way to replace a string on a click of a text link?

This is what I've come up w

Linux socket programming
Where can I find a good introduction to socket programming?

Need Reporting Advice
My SQL server doesn't support MS SQL reporting services that comes with SQL Enterprise or Express. T

question about header() security
is is safe to just use the header() function to redirect someone if they are, say, not logged in? or

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash