Re: combined or single indexes?

2010-07-06 Thread Octavian Rasnita
Hi, MySQL can use a single index in a query as you've seen in the result of explain. Of course it is better to have an index made of 2 or more columns because it will match better the query. But if I remember well, the in() function can't use an index. And I think it also can't use an index

Re: [Spam][78.6%] Re: Differences between 2 MySQL instances

2010-06-24 Thread Octavian Rasnita
From: "Joerg Bruehe" Hi! Octavian Rasnita wrote: I have tried, but with no difference. I have changed some indexes and made the queries run faster, but I still found a problem: I use a module that does paging and it makes a select(*) and this query takes a very long time. I

Re: Differences between 2 MySQL instances

2010-06-23 Thread Octavian Rasnita
run faster on MySQL 5.1 (with identical settings, hardware and operating system). 2010/6/23 Octavian Rasnita Hello, I have the following table under MySQL 5.1.43-community under Windows, and under MySQL 5.0.82sp1 Source distribution under Linux): CREATE TABLE `table_name`

Differences between 2 MySQL instances

2010-06-22 Thread Octavian Rasnita
Hello, I have the following table under MySQL 5.1.43-community under Windows, and under MySQL 5.0.82sp1 Source distribution under Linux): CREATE TABLE `table_name` ( `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `tip_ticker` tinyint(1) NOT NULL, `symbol` varchar(20) NOT NULL, `market` varcha

The query doesn't use the specified indexes

2010-06-21 Thread Octavian Rasnita
Hi, I have made an InnoDB table and I am trying to search using some keys, but they are not used, and the query takes a very long time. Here is a test table: CREATE TABLE `test` ( `id` int(10) unsigned NOT NULL AUTO_INCREMENT, `symbol` varchar(20) NOT NULL, `market` varchar(20) NOT NULL, `id_sy

Re: Problems posting to the list lists.mysql.com

2010-02-15 Thread Octavian Rasnita
Is the MySQL mailing list admin subscribed to the list? I have also sent a message or more telling about this issue, with no response. -- Octavian "mos" wrote in message news:6.0.0.22.2.20100215120015.02cd4...@mail.messagingengine.com... > At 10:51 AM 2/15/2010, Frank Becker wrote: >>Hello, >>

Inserting a default null date

2009-05-15 Thread Octavian Rasnita
Hi, I have a table with a column like: date date default null, If I enter an empty string in it, the default null value is added (as it should). But if I enter an invalid date by mistake, the date -00-00 date date is entered instead of the default null, and this is not good. Can I do som

Can't send messages to the mailing list

2009-03-16 Thread Octavian Rasnita
Hello, I was subscribed for a long time to MySQL general mailing list but now I see that I can't send messages to the list because they are rejected, and in the error mail message that returns, I saw that it says something about SPAM. I didn't send spam mails to the list or to somewhere else bu

Re: MySQL, perl, last_insert_id() question

2008-01-28 Thread Octavian Rasnita
Do you have the latest version of DBI and DBD::mysql installed? First try: $ cpan cpan> install DBI cpan> install DBD::mysql You can also do: my $sth = $dbh->prepare("select last_insert_id()"); $sth->execute(); my ($last_insert_id) = $sth->fetchrow_array(); Octavian - Original Message --

like in()

2008-01-25 Thread Octavian Rasnita
Hi, I can do: where word in('one','two','three') and I can also do: where word like 'thr%' Is there a way of combining these 2 ways? I want to select something like: where word like 'on%' or word like 'tw%' or word like 'thr%' but using a single expression, without "or". Is it possible to

Embedding MySQL

2008-01-02 Thread Octavian Rasnita
Hi, I want to embed MySQL and install it with a freeware application I make. I hope it is legally to do this. Please tell me where can I found more information about how can I do this. The app will run under Windows. Thank you. Octavian -- MySQL General Mailing List For list archives: http

grouping

2007-11-02 Thread Octavian Rasnita
Hi, I have a table with the following columns: symbol date value I want to select all the symbols (grouping by symbols) between 2 specified dates, and calculate the percent of change for each symbol. The percent of change is (the value from the last date of the symbol - the value from the f

Re: inserting data - speed

2007-07-31 Thread Octavian Rasnita
updates/deletes and replicated to another server that handles the selects. One interesting solution for extremely high insert rates is to use the BLACK HOLE table type with replication. On Jul 30, 2007, at 5:37 AM, Octavian Rasnita wrote: Hi, I made 2 similar programs that insert data conti

inserting data - speed

2007-07-30 Thread Octavian Rasnita
Hi, I made 2 similar programs that insert data continuously in 2 similar MyISAM tables, each one in its own table. Both tables have the same data (3.5 million records), but one of the tables is update much slower. The slower table is also accessed by other programs for getting data from it.

error

2007-07-10 Thread Octavian Rasnita
Hi, I have exported a database using mysqldump from MySQL 5.0.27, and I have tried importing it in a MySQL 5.0.41, but it gives the following error: ERROR 1071 (42000) at line 483: Specified key was too long; max key length is 1000 bytes Isn't mysqldump exporting the data correctly? Can I

Re: off-topic unsubscribe concern

2007-07-07 Thread Octavian Rasnita
There are just spam messages. The spam robots probably found some messages from the list somewhere and our addresses, and it put all the addresses in its database. Then, as usually, it sends spam messages to all addresses, using another address from the same message as the source address. This

Re: Problem about fulltext search.

2007-06-30 Thread Octavian Rasnita
Hi, Try: select * from test where match(name) against("hello" in boolean mode); Octavian - Original Message - From: "Niu Kun" <[EMAIL PROTECTED]> To: Sent: Saturday, June 30, 2007 6:23 PM Subject: Problem about fulltext search. Dear all, I'm planning to add fulltext search to my

Re: Select Last X rows

2007-06-30 Thread Octavian Rasnita
Hi, Try something like this: select * from (select * from table_name where ... order by last_update desc limit 10) as tbl order by tbl.last_update; Octavian - Original Message - From: "Rich" <[EMAIL PROTECTED]> To: "Submit MySQL" Sent: Saturday, June 30, 2007 3:45 PM Subject: Sele

Re: select statement with variable for table_reference?

2007-06-27 Thread Octavian Rasnita
ike: $sql = ""; for("books", "cds") { $sql .= join " union ", "(select id, title, from $_)"; } $sql .= " where ... order by ... limit ..."; So the sql query will search only in the needed tables. Octavian - Original Message -

Re: select statement with variable for table_reference?

2007-06-26 Thread Octavian Rasnita
it for each table in the (select ... where ...) and if you want to specify a search criteria for all the records of those unions, you can do it in a final where ... that's outside of those params. Octavian - Original Message - From: "Ed Lazor" <[EMAIL PROTECTED]> T

Re: select statement with variable for table_reference?

2007-06-26 Thread Octavian Rasnita
I am using the following method for doing this, but I am sure it is not the best one: (select id, title, author, 'book' as type from books) union (select id, title, author, 'cd' as type from cds) union (select id, title, author, 'dvd' as type from dvds) where ... order by ... limit ...; Octavia

error

2007-06-19 Thread Octavian Rasnita
Hi, I have tried using: mysqlcheck -u username -p database And the result: ... intranet.company_sectorOK intranet.comunicat OK mysqlcheck: Got error: 2013: Lost connection to MySQL server during query when executing 'CHECK TABLE ...

repairing/verifying tables

2007-06-08 Thread Octavian Rasnita
Hi, Is there a way of checking which of the tables of a database have errors without checking each table separately? Thanks. Octavian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Illegal mix of collations

2007-05-24 Thread Octavian Rasnita
Hi, I have tried to select data from more tables using union, but it gaves the following error: ERROR 1267 (HY000): Illegal mix of collations (utf8_general_ci,IMPLICIT) and (latin1_swedish_ci,COERCIBLE) for operation 'UNION' I have verified the tables (using show create table table_name) an

Re: show tables

2007-05-01 Thread Octavian Rasnita
Ok, thank you all. It was my mistake. I have quoted the SQL command with single quotes under Windows. Octavian - Original Message - From: "Stijn Verholen" <[EMAIL PROTECTED]> To: "Octavian Rasnita" <[EMAIL PROTECTED]> Cc: Sent: Tuesday, May 01, 2007 1

show tables

2007-05-01 Thread Octavian Rasnita
Hi, I want to print the list of tables (one on a line) from a database into an external file. I have tried: mysql -u user -p database -e 'show tables;' > file.txt mysql -u root -p information_schema -e 'select table_name from tables where table_schema="database_name";' > file.txt But the r

renaming database

2007-04-12 Thread Octavian Rasnita
Hi, How can I rename a database if it contains InnoDB tables? I have tried renaming the directory where it is located, but it doesn't work this way. Is there a method that works faster than dumping it with mysqldump then re-create it under another name? Thanks. Octavian -- MySQL General

Re: comparing storing engines

2007-03-22 Thread Octavian Rasnita
- Original Message - From: "Rolando Edwards" <[EMAIL PROTECTED]> To: "Octavian Rasnita" <[EMAIL PROTECTED]> Cc: Sent: Thursday, March 22, 2007 3:40 PM Subject: Re: comparing storing engines Assuming you have a database, let's call it DAT1 which contain all MyIS

comparing storing engines

2007-03-21 Thread Octavian Rasnita
Hi, Is there somewhere a speed comparison between the storage engines that can be used in MySQL? Thank you. Octavian -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: corrupted tables

2007-03-16 Thread Octavian Rasnita
From: "Steve Edberg" <[EMAIL PROTECTED]> Sometimes I see that some tables from my database get corrupted. Why does this happpen and how can I avoid it? It is not hard to go and use "repair table" but it seems that in this way some records could be deleted and this is not ok. If I want to have a

corrupted tables

2007-03-16 Thread Octavian Rasnita
Hi, Sometimes I see that some tables from my database get corrupted. Why does this happpen and how can I avoid it? It is not hard to go and use "repair table" but it seems that in this way some records could be deleted and this is not ok. If I want to have a very secure database, can I use MySQ

grouping

2007-02-10 Thread Octavian Rasnita
Hi, I want to use: select column1, column2, max(column3) as maximum from table_name group by column 1; Please tell me if the values from "column2" will contain the values from those records where the column3 has the maximum value. If it doesn't, please tell me how to do this as fast as possi

Re: InnoDB vs MyISAM

2007-01-04 Thread Octavian Rasnita
And is InnoDB recommended now? It depends.. :) Depends on... what? I mean, if I don't need transactions, is there another reason for using InnoDB? If it is necessary I can build the client program without foreign keys support also. Thanks. Octavian -- MySQL General Mailing List For li

InnoDB vs MyISAM

2007-01-04 Thread Octavian Rasnita
Hi, I have seen that by default some tables are created as InnoDB and some as MyISAM. I guess the table type is not chosen randomly. How is it chosen the table engine used? And is InnoDB recommended now? Does it support full text indexes? Or if not, is there a way of using full text index

selecting the last 10 rows

2006-12-30 Thread Octavian Rasnita
Hi, Is it possible to select the last 10 rows from a table in the order of their IDS, without making a separate query for finding the number of the rows? I am thinking to something like: select * from table_name order by date desc, time desc limit 10; This will select the last 10 rows, but i

what are those MySQL files for?

2006-06-30 Thread Octavian Rasnita
Hi, In the /data/database_name directory I have found a few files I don't know what they are used for. I have seen that some of them are pretty big. I don't think it is safe to delete them, but can I do something to decrease their size at least? Here are those files and their sizes in MB: 1 #sql

increase the search speed

2006-06-11 Thread Octavian Rasnita
Hi, I have the following table: CREATE TABLE `z` ( `hash` varchar(16) NOT NULL default '', `title` varchar(255) NOT NULL default '', `body` text NOT NULL, FULLTEXT KEY `title` (`title`,`body`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 I have tried the following query: select sql_calc_found

increasing the search speed

2006-06-02 Thread Octavian Rasnita
Hi, I have the following table: CREATE TABLE `z` ( `hash` varchar(16) NOT NULL default '', `title` varchar(255) NOT NULL default '', `body` text NOT NULL, FULLTEXT KEY `title` (`title`,`body`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 I have tried the following query: select sql_calc_found

searching for words with special chars

2006-04-01 Thread Octavian Rasnita
Hi, Is it possible to create a query that searches for records which contains words with special chars and with their english correspondents? For example, if a user searches for "mata", I want to return all the records that contain the words: mata măta mâţa mâţă (just like Google does). Is it

Re: Fultext search issues

2006-03-31 Thread Octavian Rasnita
From: "Gabriel PREDA" <[EMAIL PROTECTED]> You ought to use the *Boolean Full-Text Searches.* You would then do a: SELECT title, Comment FROM table_name WHERE MATCH (Comment) AGAINST ('+foo +bar' IN BOOLEAN MODE); This way the rows that contain both words have higher relevance... those that have

replication

2006-03-03 Thread Octavian Rasnita
Hi, I have 2 servers. On one of them I have MySQL 4.1 (the main server) and on the second I have MySQL 5.0. I want to use the second server to replicate the first server. Is it possible or the servers should have the same version? Or I will need to install one more MySQL 4.1 on the second server

selecting based on a max() condition

2006-02-22 Thread Octavian Rasnita
Hi, I have a table with 3 relevant columns: symbol varchar(10) not null price decimal not null and last_update datetime not null I want to select the list of unique symbols and the corresponding price and last_update fields for each line where the last_update is equal to the last_update field for

Re: selecting min, max

2006-02-13 Thread Octavian Rasnita
PS, I have forgotten to tell that I am using MySQL 5. Thank you. Teddy - Original Message - From: "Octavian Rasnita" <[EMAIL PROTECTED]> To: "Rhino" <[EMAIL PROTECTED]>; Sent: Monday, February 13, 2006 10:00 PM Subject: Re: selecting min, max

Re: selecting min, max

2006-02-13 Thread Octavian Rasnita
Hi, From: "Rhino" <[EMAIL PROTECTED]> ... > > I need to extract a list which the following values from this table, for > > each hour (in date_time field): > > > > - symbol > > - min(price) > > - max(price) > > - price where date_time is the earliest for that certain hour. > > - price where the dat

selecting min, max

2006-02-13 Thread Octavian Rasnita
Hi, I have a table with the following fields: symbol, date_time, price, volume I need to extract a list which the following values from this table, for each hour (in date_time field): - symbol - min(price) - max(price) - price where date_time is the earliest for that certain hour. - price where

fulltext searches

2006-02-10 Thread Octavian Rasnita
Hi, I have tried: select title from table where match(title, body) against('IT' in boolean mode); The result was 0 records. I have checked the min word lenght which is allowed with: mysql> show variables like '%ft_min_word_len%'; +-+---+ Variable_name | Value | +---

Re: Dictionary

2006-02-01 Thread Octavian Rasnita
Try searching on www.dict.org Teddy - Original Message - From: "Peter of Pedsters Planet" <[EMAIL PROTECTED]> To: "Mysql" Sent: Wednesday, February 01, 2006 8:27 PM Subject: Re: Dictionary I'd like to know too if posible :) On 01/02/06, Scott Hamm <[EMAIL PROTECTED]> wrote: > I've be

Re: Can I do a boolean search and get the row count in 1 SQL query?

2006-01-02 Thread Octavian Rasnita
Hi, You can do: select sql_calc_found_rows [and here follow the rest of the select query]; And then you can get the number of all found rows, not only those got by "limit 10" as follows: select found_rows(); Teddy From: "Grant Giddens" <[EMAIL PROTECTED]> > > Hi, > > I have a web app whe

Re: 2 questions

2005-12-24 Thread Octavian Rasnita
there is for "select"? > > > An update statement is optimized like a SELECT query with the additional > overhead of a write. So you can take the optimizer plan from the > corresponding SELECT statement (with the same WHERE clause and table > references). > > > > Octa

2 questions

2005-12-24 Thread Octavian Rasnita
Hi, I have used mysqldump with 5.0.15-nt and I have seen that it saves the file in UTF-8 format. This is OK, but if I try to run: mysql database < saved_file.sql It gives an error near some special chars (because the file is not ANSI). If I convert the file as ANSI, I can import the data from i

Re: fulltext search

2005-12-18 Thread Octavian Rasnita
> AFAIK you are right - MySQL treats a hypen as a word-break. And, AFAIK you cannot modify that behaviour. > > The only possibility, I think, would be to modify the source and compile your own MySQL. :-( > > However if you do a full-text search using IN BOOLEAN MODE, then you can put quotes arou

fulltext search

2005-12-18 Thread Octavian Rasnita
Hi, Please tell me how can I configure MySQL 5 in order to be able to search (using fulltext indexes) for combined words like "s-au". This is a single word and not 2 words but I think MySQL thinks that there are 2 words, one of them having a single character, and the second 2 chars, so it is not

Re: bug in MySQL 5?

2005-12-13 Thread Octavian Rasnita
From: "Gleb Paharenko" <[EMAIL PROTECTED]> > Hello. > > In my opinion, it is not a bug. REPLACE has returned the sum > of affected rows - one was deleted, and one was inserted. See: > http://dev.mysql.com/doc/refman/5.1/en/replace.html > > Thank you. I have seen that's the true. Is there any

bug in MySQL 5?

2005-12-13 Thread Octavian Rasnita
Hi, I have tried: mysql> create table z(id int unsigned not null primary key, first_name varchar(20), last_name varchar(20)); Query OK, 0 rows affected (0.06 sec) mysql> insert into z values(1, 'John', 'Smith'), (2, 'George', 'Washington'); Query OK, 2 rows affected (0.00 sec) Records: 2 Duplica

Re: install trouble, perl DBI

2005-12-12 Thread Octavian Rasnita
From: "Lewis Ashley Foster" <[EMAIL PROTECTED]> > > I'm trying to get mySQL installed on my machine but im having a bit of > trouble, obviously :) > > When i come to install mySQL server as below: > > rpm -ivh MySQL-server-standard-5.0.16-0.rhel3.i386.rpm > > I get this result: > > warning: MySQL-

Re: Character set issue ( maybe )

2005-12-05 Thread Octavian Rasnita
From: "Daniel Kasak" <[EMAIL PROTECTED]> > OK then. > > Lets re-word the question ... > > Has anyone been able to successfully enter text of a non-standard > character set ( Latin 1, UTF8 ) into Query Browser? > How about upload via a Perl script? > Yes you can insert those chars in MySQL using

Re: Cannot start MySQL under Win2000

2005-12-02 Thread Octavian Rasnita
From: "Stephen Cook" <[EMAIL PROTECTED]> Subject: Re: Cannot start MySQL under Win2000 > You must not install 5.0 over 4.1, put it somewhere else. > > Also, instead of naming the service "MySQL" both times, call it > something else (i.e. "MySQL41" and "MySQL50"). If you use the Windows > installe

Cannot start MySQL under Win2000

2005-12-01 Thread Octavian Rasnita
Hi, Is it possible to install 2 versions of MySQL on the same computer? I want to have MySQL 4.1 and 5.0 installed, and use only one of them at a time. I have installed MySQL 5.0 over MySQL 4.1 and now MySQL 5 works fine, however, I cannot start MySQL 4.1 although I have stopped MySQL 5 first.

Re: Error with PHP: undefined function: mysql_connect()

2005-11-28 Thread Octavian Rasnita
From: "Ciprian Constantinescu" <[EMAIL PROTECTED]> > In PHP 4.1 you have to include the mysql.so extension. To do so, you have to > modify php.ini, extensions section > Or better, add that extension runtime because otherwise it will just consume computer resources, and maybe not every PHP program

Re: Two MySQL databases on different computers

2005-11-27 Thread Octavian Rasnita
From: <[EMAIL PROTECTED]> > > Hi, > > > > I have two databases. Database A is located on a server that I run my > web > > hosting from. The other database B is located on a computer with a fixed > IP. > > How can I configure database B so I can access database B from my web > > server? From my A sy

low speed select

2005-11-07 Thread Octavian Rasnita
Hi, I have tried: mysql> select count(*) from table_name where date='2005-11-07' and id=11; +--+ | count(*) | +--+ |0 | +--+ 1 row in set (46.42 sec) As you may see, this query took more than 46 seconds and I don't know why. I am the single person that was using t

Re: renaming the database

2005-10-17 Thread Octavian Rasnita
Thanks. I want to rename the database in order to keep it as a backup, then to temporarily create a new one with the same name as a test, because more programs use that database name. Teddy - Original Message - From: "Jigal van Hemert" <[EMAIL PROTECTED]> To: "Octa

renaming the database

2005-10-16 Thread Octavian Rasnita
Hi, Is there a command for renaming a MySQL database? Thank you. Teddy -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]

Re: creating socket

2005-10-10 Thread Octavian Rasnita
From: "Sujay Koduri" <[EMAIL PROTECTED]> > This error means that the mysql server has not started in the first place. > So try to have a look in the logs (generally this should be in > /var/lib/mysql/) and find out the reason why the server hasn't started. > > sujay > I have discovered that mysql

creating socket

2005-10-10 Thread Octavian Rasnita
Hi, I have installed mysql and loaded mysqld, but I cannot connect to it with mysql because it gives an error telling that "it cannot connect using socket /var/lib/mysql/mysql.sock". I have checked that dir, but I don't have that socket file there. Please tell me how to create it. I don't know L

Re: Table names with periods

2005-09-28 Thread Octavian Rasnita
From: "Chance Ellis" <[EMAIL PROTECTED]> Point taken and yes the manual was reviewed. However, I thought in the past that I had seen someone post a method in which table names could be created with special characters. Can't you use a single table instead of more tables? Or each table has differ

too many connections

2005-09-26 Thread Octavian Rasnita
Hi, I guess it is a stupid simple question: I have seen the following error in the log files: DBI connect('database=[database]','[username]',...) failed: #08004Too many connections at /[path_to_script] line 12 I have taken a look in my.cnf but I couldn't find some settings for increasing the po

Re: Behaviour of like expression

2005-09-11 Thread Octavian Rasnita
Yes, in perl is OK, but in MySQL it is not really ok. Perl regular expressions use ^ and $ for specifying the start and end of the string while MySQL like operator doesn't For example, if $string = 'a', // with match in perl, but /^$/ won't match. MySQL like operator could use '%' for matching e

renaming a database

2005-08-21 Thread Octavian Rasnita
Hi, Please tell me how to rename a database. I couldn't find this in the manual. I have tried to rename manually the name of the directory that holds that database, but some tables can't be accessed after that. (I have found that they are InnoDB tables, even though I never specified that I want th

Re: query

2005-08-16 Thread Octavian Rasnita
16, 2005 2:45 PM Subject: Re: query > On 16/08/2005, "Octavian Rasnita" wrote: > > > I want to create a query that selects the diference between the value > > of a field from the current record and the value of the same field > > from the previous record. > >

query

2005-08-16 Thread Octavian Rasnita
Hi, I want to create a query that selects the diference between the value of a field from the current record and the value of the same field from the previous record. Is this possible? It should return a list of diferences. Or, at least I should be able to do that query to do this diference betw

Re: Question about BLOB

2005-08-02 Thread Octavian Rasnita
Hi, I think that I have seen many times the advice not to store the images in MySQL, but to store them on the hard disk while putting the path to them in the database. They could be accessed much faster this way. Teddy - Original Message - From: "Gelu Gogancea" <[EMAIL PROTECTED]> To:

general question

2005-07-28 Thread Octavian Rasnita
Hi, I am using a MySQL database on a web site, and I would like to know what happends if someone searches in the database using a form, but after a few seconds MySQL starts the query, that user hit the "Stop" button of the browser. Will MySQL continue its searching and also create the cache, or it

What does this error mean?

2005-07-24 Thread Octavian Rasnita
Hi, I have tried the following query and it works fine. It takes 11 seconds and this is a little too much, but this is another issue. The problem is that if I delete the following condition from it: a.id_categories=31 The query gives the following error: ERROR 1032 (HY000): Can't find record i

Re: more queries vs a bigger one

2005-07-23 Thread Octavian Rasnita
Hi, I have finally modified that long query and splitted into smaller ones. Now the main query is: select sql_calc_found_rows a.pre_title, a.title, a.post_title, substring(a.body, 1, 250) as preview, a.hash, a.date, a.time, length(a.body) as size, a.id_categories, n.name as newspaper, sc.category

Re: more queries vs a bigger one

2005-07-19 Thread Octavian Rasnita
From: <[EMAIL PROTECTED]> Subject: Re: more queries vs a bigger one > Hello, > approx. how long does it take your "big" query to run as it is now? Are > these queries appending a table? or are they buiding a result (from a > "chain" of queries)? Have you tried separating them out? Any differen

more queries vs a bigger one

2005-07-17 Thread Octavian Rasnita
Hi, I have a big query that involves searching in more tables, and I think this might be slower than creating more smaller queries. What do you think, is this true generally? The query searches in a big table but it also counts the number of records from other 2 tables based on a criteria, and us

slow query

2005-07-17 Thread Octavian Rasnita
Hi, I have a problem with a query, because it works very slow and I am trying to analyze it with "explain". I have read that if I use STRAIGHT_JOIN in a select query, the server will take the tables in the order I specified them in that query. I have tried to "explain" a query that uses STRAIGHT

creating a faster query

2005-07-16 Thread Octavian Rasnita
Hi, I have a table with a DATE type column and I want to search for more records that have the same year and month. I have tried searching with: select ... where date_format(date, '%Y-%m')='2005-06' ...; I know that if I apply a function to the date column, the index on that column is not usefu

fulltext searching using special chars

2005-07-02 Thread Octavian Rasnita
Hi, I am trying to search for a word that contains special chars like ş or ţ, but I find only the words and like when the special chars are not a part of the word. I found that if I search for "ş" (in boolean mode), I am able to find the records that contain the

selecting more sum()

2005-06-22 Thread Octavian Rasnita
Hi, I have the following tables: create table articles( id int unsigned not null primary key, title varchar(255) not null, body text not null ); create table newspapers( id int unsigned not null primary key, name varchar(255) not null ); create table visitors( id int unsigned not null primary k

Re: Perl/mysql question

2003-07-30 Thread Octavian Rasnita
Hi all, I am using DBI and DBD::mysql to connect to a MySQL database from perl and I would like to get the execution time period after a query, like MySQL standard client shows. Sometimes when I work in the standard console client it tells me that there are x wornings. How can I see which are tho

Dumping a database

2003-02-24 Thread Octavian Rasnita
Hi all, I've seen that it is very easy to export an entire database using mysqldump. Can I export any database using this program? Will it export the sql statements for creating indexes, and the binary fields? Can I restore any database exported with this method without any problem? Thank you.

Re: Counting null values

2003-02-13 Thread Octavian Rasnita
t they are different values. In fact, the null values should be considered different values when using "distinct". Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - From: "Paul DuBois" <[EMAIL PROTECTED]> To: "Octav

Re: How to modify ft_min_word_len?

2003-02-12 Thread Octavian Rasnita
uesday, February 11, 2003 9:24 PM Subject: re: How to modify ft_min_word_len? On Monday 10 February 2003 17:55, Octavian Rasnita wrote: > Please tell me how to modify the variable ft_min_word_len. > > I've tried: > > set ft_min_word_len=2; > set @ft_min_word_len=2; >

Re: Counting null values

2003-02-12 Thread Octavian Rasnita
It won't work because MySQL doesn't count null values. Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - From: "Daniel Kiss" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 11, 2003 8:18 AM Subject: Re: Counting null values Hi

How to modify ft_min_word_len?

2003-02-10 Thread Octavian Rasnita
Hi all, Please tell me how to modify the variable ft_min_word_len. I've tried: set ft_min_word_len=2; set @ft_min_word_len=2; The second creates a new variable I think and the first one tells me that there is no such variable. Thank you. sql Teddy, Teddy's Center: http://teddy.fcc.ro/ Email

Caching queries

2003-02-10 Thread Octavian Rasnita
Hi all, Please tell me what should I do to make MySQL cache all the queries that can be cached. Can I do this if I am not the administrator of MySQL server? (on a session basis...). Thanks. Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] -

Re: cannot locate dbi.pm while running perl scripts

2003-02-10 Thread Octavian Rasnita
Get DBI.pm from search.cpan.org. Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - From: "Paul Choy" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, January 07, 2003 10:53 PM Subject: cannot locate dbi.pm while running perl scripts Hi :

Counting null values

2003-02-10 Thread Octavian Rasnita
Hi all, I have a table where I have something like this: | abc | | abc | | xxx | | null | | null | | null | I want to count these lines to give the result 5, meaning a distinct count for values which are not null, and counting all the null values. This means 1 for "abc", one for "xxx", and 3 fo

Re: Applications for creating reports for MySQL

2003-02-08 Thread Octavian Rasnita
Yes I have a question regarding Crystal Reports, but ... I don't know if you can help me. I am blind and I would like to know if this program has an interface accessible for a screen reader. Thank you. Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message --

Re: Applications for creating reports for MySQL

2003-02-08 Thread Octavian Rasnita
;s Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - From: "Joshua J.Kugler" <[EMAIL PROTECTED]> To: "Octavian Rasnita" <[EMAIL PROTECTED]>; "MySQL" <[EMAIL PROTECTED]> Sent: Thursday, February 06, 2003 12:08 AM Subject: Re: A

Sorting with null values

2003-02-07 Thread Octavian Rasnita
Hi all, Please tell me how can I sort a column and force placing the null values to the end of list? Thank you sql query Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Before posting, please check:

Applications for creating reports for MySQL

2003-02-05 Thread Octavian Rasnita
Hi all, Does anyone know a program for Windows that can create reports for MySQL databases? If you know more, please tell me more, because I need to check which of them are accessible for the blind. Thank you. Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] -

Bug in DBI module for Perl 5.8.0 under Win 2k

2003-02-02 Thread Octavian Rasnita
Hi all, I've discovered that I cannot use the fork() function in a Perl program that uses the DBI module under Windows 2000. I've tried the following script: #!/perl/bin/perl use DBI; print "Content-type: text/html\n\n"; $| = 1; my $pid; if ($pid = fork()) { } elsif (defined $pid) { } els

Re: Windows & InnoDB

2003-01-25 Thread Octavian Rasnita
Yes, InnoDB is available in the compiled version for Windows. Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - From: "Darren Young" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Saturday, January 25, 2003 12:03 AM Subject: Windows & InnoDB I

What's wrong with mysql 4.0.9?

2003-01-25 Thread Octavian Rasnita
Hi all, I have mysql 4.0.9 gama for Windows installed and I have a problem because I cannot set a password for a username. I've tried: mysql> grant all on *.* to 'teddy@localhost' identified by 'password'; All went right but I can't access mysql using this newly created account. I can see this

Re: Is it normal?

2003-01-25 Thread Octavian Rasnita
Is it the same in all database servers? Teddy, Teddy's Center: http://teddy.fcc.ro/ Email: [EMAIL PROTECTED] - Original Message - From: "gerald_clark" <[EMAIL PROTECTED]> To: "Octavian Rasnita" <[EMAIL PROTECTED]> Cc: "Stefan Hinz, iConnect (Ber

Re: Is it normal?

2003-01-24 Thread Octavian Rasnita
- From: "Stefan Hinz, iConnect (Berlin)" <[EMAIL PROTECTED]> To: "Octavian Rasnita" <[EMAIL PROTECTED]>; "MySQL" <[EMAIL PROTECTED]> Sent: Monday, January 20, 2003 11:42 PM Subject: Re: Is it normal? Octavian, > mysql> create table

Which is the upper limit?

2003-01-22 Thread Octavian Rasnita
Hi all, I've tried the "repeat" function for testing some tables, but it cannot create very big strings. Do you know which is its upper limit? I've tried the following query: mysql> select length(repeat('abracadabra', 10)); +---+ | length(repeat('abracada

  1   2   >