Welcome to WebmasterWorld Guest from

Forum Moderators: coopster & jatar k

Message Too Old, No Replies

Query on a column with a lot of content

1:13 pm on Oct 7, 2003 (gmt 0)

Full Member

10+ Year Member

joined:Aug 29, 2003
votes: 0


I'm rather new to php and mysql. I've got to make a query on about 150.000 records. Each of these records has a number, a title, some more information and a field with a lot of text (sometimes more than 500 characters per field). How do I make a query on these large fields via PHP? I guess that it will take a long while to query all these fields. Are there tricks to make this query faster?


1:22 pm on Oct 7, 2003 (gmt 0)

Junior Member

10+ Year Member

joined:Feb 26, 2003
votes: 0

Not sure exactly what you are looking for but take a look at MySQL full text search.


Using the MATCH() function you can quickly search these fields if they are FULLTEXT indexes.

4:22 pm on Oct 7, 2003 (gmt 0)

Senior Member

WebmasterWorld Senior Member 10+ Year Member

joined:July 16, 2001
votes: 0

Of the 150,000 records, do you need to retrieve all of them? Or just a subset? I'd probably build an index on "number" to make the query faster. Then use a query like the one below, where the indexed field is the first field you use in your where clause:

select number, title, more_info, text_field where number = 'yourqueryvalue'