|
Posted by d on 02/13/06 12:21
"frizzle" <phpfrizzle@gmail.com> wrote in message
news:1139609844.558552.125450@f14g2000cwb.googlegroups.com...
> Hi group.
>
> I have a news management system, with a mySQL backend.
> I tested it yesterday with 1.000.000+ records, testing my url system.
> I pulled out records calling them by the url field. It was incredibly
> fast, but now,
> when i call 5 records, ordered by date (which were inserted randomly)
> it's incredibly slow. And i only have 100.000 records left at the
> moment.
> My database structure is below, and i son't know how i could get it to
> run
> any faster ...
>
> Frizzle.
Add an index on the date column. :)
dave
>
> ******************* DATABASE ********************
>
>
> Field -> Type -> Null -> Standard Value
>
> id int(11) No auto_increment
> author_id int(11) No
> author_ip int(11) No 0
> created datetime No 0000-00-00 00:00:00
>
> published datetime No 0000-00-00 00:00:00
>
> title varchar(35) No
> url varchar(35) No
> text text Yes NULL
> visible tinyint(1) No 1
> sticky tinyint(1) No 0
> commentable tinyint(1) No 1
>
>
> Keyname Type Amount Field
> PRIMARY PRIMARY 100000 id
> id UNIQUE 0 id
> url UNIQUE 1 url
> published INDEX 100000 published
>
Navigation:
[Reply to this message]
|