>
> >I have following query:
> >
> > SELECT SQL_NO_CACHE users.user_name assigned_user_name, accounts.* FROM
> > accounts LEFT JOIN users ON accounts.assigned_user_id=users.id where
> > (accounts.assigned_user_id='1') AND accounts.deleted=0 ORDER BY
> > phone_office asc LIMIT 620300,20
> >
> > In
I have following query:
SELECT SQL_NO_CACHE users.user_name assigned_user_name, accounts.* FROM
accounts LEFT JOIN users ON accounts.assigned_user_id=users.id where
(accounts.assigned_user_id='1') AND accounts.deleted=0 ORDER BY
phone_office asc LIMIT 620300,20
In your opinion, what group
"Marko Knezevic" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
Here are my tables and queries i am running on them with index
explanations.
Hope this will help.
ACCOUNTS TABLE:
+-+--+--+-+--
Do you have an index "deleted + name" on the accounts table?
How many rows have "deleted=0"?
that depends because SugarCRM doesn't delete anything from DB just marks
item as deleted using this field.
Can you apply any more filter in the users table (like date)?
You are requesting all rows.
I also have following situation:
SELECT count(*) FROM accounts LEFT JOIN users ON
accounts.assigned_user_id=users.id where ((accounts.phone_office like '01
389437%' OR accounts.phone_alternate like '01 389437%' OR accounts.phone_fax
like '01 389437%')) AND accounts.deleted=0
Explain say
Marko,
I have a table with 5,000,000 records that takes about 1 second
to show the results.
Perhaps your queries aren“t optimized properly.
Ronan
Here are my tables and queries i am running on them with index explanations.
Hope this will help.
ACCOUNTS TABLE:
+---
See below, and check that the indexes are right, or that the queries
aren't
negating the indexes. I can run queries against a properly indexed table
of
26 million rows in less than a second on lesser hardware (ok, so the SAN
isn't lesser). The manual also contains a lot of information on how t
Good morning everybody!
We are working on a big project involving SugarCRM and in the end it will
contain around 1 000 000 records per table in MySQL database. Whole system
is running on dedicated server which consists of two Xeons @ 3 Ghz, 2 GB RAM
and two 150 GB disks @ 1 rpm running und
Rhino wrote:
> Okay, you've convinced me that you need some Left Joins ;-)
>
> I think you'll have to use a mix of Left Joins and Inner Joins. In
> the cases where you need a row even if something doesn't exist, like
> a subject who has an address but no phone number, use a Left Join. In
> any cas
Rhino wrote:
> Your design seems fine, although you haven't explained how the field
> and field_lookup tables join to the others so I am making some
> assumptions.
Table field_lookup has two values defined as primary keys: ID_company and
ID_field
Thus, using simple query like:
SELECT company.nam
Hello, first i would like to greet all of you because i am new on this list.
I am working on yellowpages application and am having some problems.
I have different tables for storing info about different companies, their
addresses & phone numbers and their field of work (i can't remember exact
word
11 matches
Mail list logo