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

help with Get_
ok some how this is not working i am not sure what i am doing wrong here but what this does is when

Only add new information from XML to MySQL
What I am doing, is taking a xml file, and adding the values to a database. However, what I want to

Displaying pictures
i have worked my way through storing images in directory and storing the location in mySQL db.Now i

this code is not working????
it says this error.. Warning: Division by zero in ..

the variables are correct, so why is th

Header is not working in IE
Hi ! header function is not working in IE but it works in FF, Safari, Chrome. any help please. :

Variable uses and placement
I'm new to PL/SQL and am trying to learn about variable valid uses/placement (any pointers to any do

Script not running properly
Hello Everyone
This is a basic script for posting to a database. I'm not sure why it doesn't work

HTML form problem
Ive made a form to that i want to send to my email via PHP. but when it send only the name's etc sen

Files in current folder. Should be an easy fix.
Never mind. I've asked about this before and just found my answer. Anyway to delete this?

Problem with a select distinct
I have a problema with a select distinct, I have the next sql:

select distinct a,b,c,d fr

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