Improving queries - small indexes and tables

2004-01-20 Thread Noamn
Judging by some of the comments posed on this list, I wonder whether the following statements are true: 1. There is no point having an index on a field if that field can only have a few values 2. A table should have at least ten entries, in order to prevent all the table being scanned to find a mat

FW: Improving a query

2004-01-20 Thread Noamn
mysql Cc: Noamn Subject: Re: Improving a query * Noamn [...] Please reply to the list. :) > Adding the composite index doesn't make any difference as far as > I can see. > Isn't there a way of forcing a specific index to be used? Yes. From mysql version 4.0.9 you can write

RE: Improving a query

2004-01-20 Thread Noamn
PRIMARY | 3 | p.sochen |1 | | +-+++--+-+-- +--+-+ 3 rows in set (0.00 sec) -Original Message- From: Roger Baklund [mailto:[EMAIL PROTECTED] Sent: Tuesday, January 20, 2004 3:33 PM To: Cc: Noamn Subject: Re: Improving a query * Noamn > I have a query which was

Improving a query

2004-01-20 Thread Noamn
I have a query which was written like this select p.id, p.name, p.money, s.name, agents.name from projects p, status s, agents where p.stage = 0 and p.status = s.id and p.agent = agents.id order by p.name Despite the fact that p.name is indexed, 'explain' shows in the extra column 'using temporary

Status variable "select_full_join"

2004-01-20 Thread Noamn
The manual says that this variable should be as low as possible. At the moment, its value is growing slowly but steadily in my database, and I'm trying to check where the problem is. I have inserted counters into each program module, so I can tell which queries are being executed. To the best of m

Problem displaying 'count'

2004-01-08 Thread Noamn
I don't know whether this is a problem with mySQL or Zeos (freeware Delphi components), but I'll ask here: When I use 'count' in a one table query, Zeos defines the resulting field as TIntegerField. When I use 'count' in a two table query, the resulting field is TLargeIntField, which causes problem

RE: A little help with this select?

2004-01-06 Thread Noamn
Rory wrote: The query is behaving exactly as it should. Your query asks it to return only those workers that are listed in the webprojectassign table. Seeing as there are no entries in the webprojectassign table, no workers match and hence no results are produced. No'am adds: I think that Tyler

mySQL in Hebrew/my.cnf

2004-01-01 Thread Noamn
I asked about a week ago how to get mySQL to index correctly in Hebrew, and the best answer that I received was to define a my.cnf file as follows [mysqld] set-variable = default-character-set = hebrew I created the file /etc/my.cnf using the root account, stopped the mysql daemon then restarted.

RE: mySQL in Hebrew

2003-12-27 Thread Noamn
ou have an error in your SQL syntax' message. 'Alter table' gives the same message. I even copy and pasted the example in the online documentation, which gave me the same answer. I am using version 3.23.51 on linux. -Original Message- From: Noamn [mailto:[EMAIL PROTECTED]

mySQL in Hebrew

2003-12-25 Thread Noamn
Does anyone have any experience of working with mySQL in Hebrew? The front end to my database is written in Delphi/Windows; it transmits Hebrew characters and displays Hebrew characters. The backend is in mySQL/Linux, and what was Hebrew appears in English characters. The only problem which I have

RE: Comparing date fields (Delphi programmers take note)

2003-12-18 Thread Noamn
Thanks for all those who helped me with this a few days ago (I've only now had the chance to get back to programming). As someone correctly surmised, I am using Delphi and connecting to mySQL via a TQuery (actually a TZQuery, via Zeos components). What I have discovered is that 1. mySQL doesn't li

RE: Re[2]: Comparing date fields

2003-12-16 Thread Noamn
I assume that I will have to write "01/01/02" Thanks for the help. Let's hope that there aren't any more questions of this ilk and I can continue to port my application. No'am -Original Message- From: Martijn Tonies [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 4:47 PM To: [

RE: Comparing date fields

2003-12-16 Thread Noamn
2 mysql> -Original Message- From: Jay Blanchard [mailto:[EMAIL PROTECTED] Sent: Tuesday, December 16, 2003 4:04 PM To: Noamn; [EMAIL PROTECTED] Subject: RE: Comparing date fields [snip] I'm in the process of converting an application from Paradox to mySQL which is why I have these

Comparing date fields

2003-12-16 Thread Noamn
I'm in the process of converting an application from Paradox to mySQL which is why I have these syntax questions. mySQL doesn't like a query with this syntax: select p.name, from projects p, ... where p.closeddate >= :fd and p.closeddate <= :td ... where fd ("from date") and td ("till date"

'Sum' syntax

2003-12-16 Thread Noamn
I'm using v3.23.51 on Linux. Can anyone explain why a simple 'sum' select won't work?? Here is the example: mysql> select sum (id), pet from visits group by pet; ERROR 1064: You have an error in your SQL syntax near '(id), pet from visits group by pet' at line 1 -- MySQL General Mailing List F

RE: Linux access question

2003-12-03 Thread Noamn
Thanks to all who responded to my query. Had I read a bit more of the mySQL manual, I would have seen exactly what I needed (section 4.4.5). The only problem was that the mySQL monitor has to be run from the same computer on which mySQL is running; yesterday I disconnected the screen from my linu

Linux access question

2003-12-03 Thread Noamn
About a year ago, I set up mySQL on a computer running linux (probably RH7.1). At the time I thought that I would investigate how I could use this server in my business, but then I had more pressing issues and so neglected the subject. Now that I have some spare times and correct tools (Delphi 7),