Hi,
I want to find the earliest and latest times in the time column of my table
internet_usage:
+--+--+--+-+-+---+
| Field| Type | Null | Key | Default | Extra |
In the last episode (Jul 14), J S said:
I want to find the earliest and latest times in the time column of my
table internet_usage:
+--+--+--+-+-+---+
| Field| Type | Null | Key | Default | Extra |
Creating a key will make that query execute very fast,
but if that is the only reason for the key you are
going to be trading quite a lot of space for the speed
of one query.
How often are you going to run this query? If you
have 324 million rows, then that index is going to
consume somewhere
Thanks for your reply. Can I just check my syntax is right for creating the
key?
CREATE INDEX urlindex ON internet_usage (time);
I ran this before but got an error 27 (eventhough the filesize ulimit was
set to unlimited). So just wondered if I was using the wrong syntax?
JS.
In the last
In the last episode (Jul 14), J S said:
Thanks for your reply. Can I just check my syntax is right for
creating the key?
CREATE INDEX urlindex ON internet_usage (time);
I ran this before but got an error 27 (eventhough the filesize ulimit
was set to unlimited). So just wondered if I was
Hmmw your syntax should ork. Possibly try
CREATE INDEX urlindex ON internet_usage (time(8));
W 8hich will only use the first charaters of your time field, it should
make the index significantly smaller in size.
Though I'm not completly sure shorting time field this way is legal, but
you can
In the last episode (Jul 14), John Larsen said:
Hmmw your syntax should ork. Possibly try CREATE INDEX urlindex ON
internet_usage (time(8)); W 8hich will only use the first charaters
of your time field, it should make the index significantly smaller in
size.
A timestamp field is only 4 bytes
In the last episode (Jul 14), J S said:
Thanks for your reply. Can I just check my syntax is right for
creating the key?
CREATE INDEX urlindex ON internet_usage (time);
I ran this before but got an error 27 (eventhough the filesize ulimit
was set to unlimited). So just wondered if I was