Hi Arcangelo!
Try this:
SELECT COUNT(*), url, SUBSTRING_INDEX(url, "?", 1) AS page_name
FROM sites
GROUP BY page_name
SUBSTRING_INDEX will return the leftmost (or rightmost) part of a string
before the ocurrence of a delimiter ("?" in this case. See Documentation:
[snip]
I've a field with
www.s.com/p.php?id=3
www.s.com/p.php?id=4
www.s.com/p.php?id=5
if a do a query with the atribute 'group by' i want that the system
regroup
all that is after the '?'
is that possible?
SELECT field WHERE all that is after the '?' GROUP BY all that is after
the
'?'
the r
Hi,
I've a field with
www.s.com/p.php?id=3
www.s.com/p.php?id=4
www.s.com/p.php?id=5
if a do a query with the atribute 'group by' i want that the system regroup
all that is after the '?'
is that possible?
SELECT field WHERE all that is after the '?' GROUP BY all that is after the
'?'
the result
---+
takes about minute and a half.
- Original Message -
From: "Michael Stassen" <[EMAIL PROTECTED]>
To: "Dan Sashko" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Wednesday, November 10, 2004 6:01 PM
Subject: Re: SELECT on string
Wha
What does
EXPLAIN SELECT * from rec where string_field='somestring';
say?
Michael
Dan Sashko wrote:
hi i have a recordset of about 4 mil records,
SELECT * from rec where string_field="somestring"
takes very long time (30+ sec). string_field is indexed MUL. Is there way to
make it faster?
--
M
hi i have a recordset of about 4 mil records,
SELECT * from rec where string_field="somestring"
takes very long time (30+ sec). string_field is indexed MUL. Is there way to
make it faster?