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

column name cancatenation within PL/SQL
I have a PLSQL store procedure, and the following statement is part of a subquery
fname||lnam

Save cookie to DB
I'm working on a pixel tracking script for an incentive website and I need to use an ASP script to s

PHP Redirecting
Hello everyone. Is there a way to redirect people to pages within a statement in PHP? Since there is

button help
i originally had this but realised it is much easier to have a button.

Code: <?php

Variable Clash
In the past I've had variables clash. For example:

Code: <?php
$c = 5;
$ca

Problem with PHP/mySQL login code
Hello,

There is an error in my login script and I can't figure out what it is...
I believe

j1inmis Ouput layout changes
Hi,

Can anybody tell how can j1inmis output layout can be changed so that vendor names ge

getting Vars to pass to next page.
Hello all,
I have a confusing situation on my hands, i am a member of a gaming community and we

include problem
I have my root folder as:
Code: $root = $_SERVER["SITE_HTMLROOT"]; // the server root<

ctype() validation - allowing illegal characters
Hello,
I use ctype() to filter and validate a user form. However, I am trying to allow certain c

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