Re: MSSQL NoLock vs MySQL NoLock

2006-10-31 Thread Ow Mun Heng
On Tue, 2006-10-31 at 10:35 -0600, Dan Nelson wrote: > In the last episode (Oct 31), Ow Mun Heng said: > > Just wanted to post this here to see if anyone knows the difference. > > > > In MSSQL, there is a hint which can be used to ask the DB to not lock > > the tables during queries and then to re

Re: Slow seach - Possible better query PROBLEM SOLVED

2006-10-31 Thread Albert Padley
Dan, Actually you were on the right track. I changed your suggested query to the following and it seems to work and is a lot quicker. SELECT id, subject, updated FROM mrldisc WHERE updated > SUBDATE(NOW (), INTERVAL 48 HOUR) AND mainthread = 'T' ORDER BY updated DESC LIMIT 50 Thanks. A

Re: Slow seach - Possible better query

2006-10-31 Thread Albert Padley
Dan, On Oct 31, 2006, at 3:41 PM, Dan Buettner wrote: Albert, it seems like the first query could be simplified, like so: SELECT id, subject, updated FROM mrldisc WHERE updated > SUBDATE(NOW(), INTERVAL 48 HOUR) ORDER BY updated DESC LIMIT 50 This query won't work. The table contains threa

Re: Max of Count

2006-10-31 Thread Dan Buettner
This might work for you, Jerry - you're on the right track, pretty close. SELECT prod.prod_id, COUNT(*) FROM prod, prod_rel WHERE prod.prod_id = prod_rel.prod_id GROUP BY prod.prod_id ORDER BY 2 DESC LIMIT 1 Be aware that using the LIMIT 1 may be misleading in that if you have multiple entries w

Re: Slow seach - Possible better query

2006-10-31 Thread Dan Buettner
Albert, it seems like the first query could be simplified, like so: SELECT id, subject, updated FROM mrldisc WHERE updated > SUBDATE(NOW(), INTERVAL 48 HOUR) ORDER BY updated DESC LIMIT 50 This might help it hit the index you've created on the UPDATED column. I know there have been bugs here an

Slow seach - Possible better query

2006-10-31 Thread Albert Padley
I have a query that works and returns the correct results. However, it is very slow ( 6-12 seconds on 5000 row table). Since this table will grow to several hundred thousand rows very shortly, I am worried. Here is the query that works: SELECT id, subject, updated FROM mrldisc WHERE (id IN (

Max of Count

2006-10-31 Thread Jerry Schwartz
This should be simple, but I haven't used a subquery in quite this way, and have little experience with GROUP BY. I have 2 tables prod:prod_id /* a unique key */ prod_rel:prod_id /* values that tie prod_rel to prod */ A prod_id in prod might have 0 or more matching rows in prod_rel.

Re: finding NULL records

2006-10-31 Thread Martijn Tonies
> I inherited a system in which the code was writing the string "NULL" into a > CHAR field. It took me a long time to figure out what MySQL CLI was showing > me. > > These kids today... Oh my, sounds like a candidate for www.thedailywtf.com :-) Martijn Tonies Database Workbench - development

RE: MyISAM vs InnoDB

2006-10-31 Thread Jimmy Guerrero
Hello, Although the number of records is a consideration to weigh in your decision, there are many other (perhaps more important) factors to consider. For example, do you need foreign keys? transactions? row-level locks?...then InnoDB is your choice. Perhaps with more details concerning the char

MyISAM vs InnoDB

2006-10-31 Thread Francis
Hi list, Question about MyISAM vs InnoDB ? What is the best to use, I have a large table contain around 10 millons of records. What is the best for me ? Use MyISAM or InnoDB ? Ty for reply ☺ -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To u

crystal reports andd mysql

2006-10-31 Thread Roberto William Aranda-W Roman
hello everybody anybody had to deal with this? i have a windows form created on VB.net to get a report on embbeded crystal reports develop program im trying to customize the fields to show by using the CR form via Sql Sintax option for the fields but the formula editor seems does not underst

RE: finding NULL records

2006-10-31 Thread Jerry Schwartz
I inherited a system in which the code was writing the string "NULL" into a CHAR field. It took me a long time to figure out what MySQL CLI was showing me. These kids today... Regards, Jerry Schwartz Global Information Incorporated 195 Farmington Ave. Farmington, CT 06032 860.674.8796 / FAX: 86

Re: transaction in mysql 5

2006-10-31 Thread George-Cristian Bîrzan
On Tue, Oct 31, 2006 at 08:58:04PM +0300, Ahmad Al-Twaijiry wrote: > is it possible that one of my script process will select the same data > that the other process is selecting or updating ? or if I run a second > process of my script it will not be able to read/write anything until > the first sc

Re: MSSQL NoLock vs MySQL NoLock

2006-10-31 Thread Dan Nelson
In the last episode (Oct 31), Ow Mun Heng said: > Just wanted to post this here to see if anyone knows the difference. > > In MSSQL, there is a hint which can be used to ask the DB to not lock > the tables during queries and then to read un-commited/dirty data. > This command is like > > select c

transaction in mysql 5

2006-10-31 Thread Ahmad Al-Twaijiry
Hi everyone I have a PHP script that will run every minute and do a lot of SELECT and UPDATE statments All my tables are InnoDB and I'm using PHP 5 and POD class ( http://php.net/pod ) to connect to mysql, in my script I start the transaction (using method beginTransaction() ) in the beginning o

use multiple CPUs?

2006-10-31 Thread Chris Kantarjiev
Apologies if this is covered elsewhere, but I can't seem to track down all the pieces... I just installed mysql (4.1.21) on a multi-cpu opteron system running fedora core. I used the binary distribution, mysql-standard-4.1.21-unknown-linux-gnu-x86_64-glibc23 instead of compiling it myself as

New DBManager Standard Edition 3.2.1

2006-10-31 Thread COS
DBTools Software is pleased to announce the new DBManager Standard Edition. This is a bug fix with some new features and improvements. New Features and Improvements a.. Better support for SQlite Unicode databases b.. Now the Freeware Edition can load as many servers as available (1 Database En

security impacts by Create_tmp_table_priv?

2006-10-31 Thread Marten Lehmann
Hello, is it safe to give users in s shared hosting environment the Create_tmp_table_priv privilege? Are any other privileges granted by this option? Why does mysql store the temporary tables? What happens if the connection dies before mysql has deleted the temporary table? Does you user see

RE: finding NULL records

2006-10-31 Thread Jay Blanchard
[snip] >And the reason for that is because nothing is actually equal to NULL. >For a field to be equal to NULL it would actually have to contain NULL, >in which case it would not be actually NULL. What? NULL doesn't equal NULL because NULL means "unknown". A column can have 2 states: known or un

Re: Incemental backup

2006-10-31 Thread Taymour A. El Erian
Philip Mather wrote: Taymour, I just bough innodb hotbackup, I need to do incremental backup as I have a database which is several GB. Is it ok that I enable the binary log and using innodb hotbackup to create a full backup and use the binary log for incremental ?, if yes how do I force mysq

table not found

2006-10-31 Thread wang shuming
Hi! 2 level derived SQL like this: select field1,field2,(select sum(f3) from (select f3 from b1 where b1.f2=a1.f2) a3 ) field3 from a1 SQL error, table a1 not found , that is a1.f2 not found Regards! Shuming Wang Xtech Company limited Room 29H, 29/F,Plaza 2, Tiancheng Building,No 96 Long

MySQL 5.0.27

2006-10-31 Thread Jacques Marneweck
Hi, What impact does the MySQL 5.0.27 ABI changes have on various components available from the MySQL Website: * OBDC 3.51 * php pdo-mysql * php ext/mysql Does the ABI breakage which this release fixes cause issues when connecting from 5.0.26 clients or only for clients which use functio

Re: MySQL memory allocation

2006-10-31 Thread Ravi Prasad LR
Which thread library is the mysqld linked against? Linuxthreads shows each thread as a separate process in top or ps output. All threads share the same memory. From your output, it is likely that you are using linuxthreads(all pids having the same VSZ and RES memory). Regards, Ravi Cabbar

Re: MySQL memory allocation

2006-10-31 Thread Ow Mun Heng
On Tue, 2006-10-31 at 01:30 -0800, Cabbar Duzayak wrote: > Hi, > > Could you please tell how I can tell how much memory does mysql server > allocate on a linux box? I tried doing: > > top -b -n 1 | grep mysql > > But, it printed out bunch of processes for mysql. Are these all using > shared memo

MySQL memory allocation

2006-10-31 Thread Cabbar Duzayak
Hi, Could you please tell how I can tell how much memory does mysql server allocate on a linux box? I tried doing: top -b -n 1 | grep mysql But, it printed out bunch of processes for mysql. Are these all using shared memory so each line gives you the total amount for mysql? How can one interpre

Re: finding NULL records

2006-10-31 Thread Martijn Tonies
>>> SELECT * FROM tests WHERE test_id IS NULL >> >> Yes, that works, but I was also trying SELECT * instead of just the >key >> field (just a typo in the example). The problem was in the equal sign > >> versus the 'IS' operator. Any reason why MySQL does not honor >> =NULL? Seems kind of odd.

Re: finding NULL records

2006-10-31 Thread Martijn Tonies
>Of course this will return an empty set because you have only selected >the test_id, try this; > >SELECT * FROM tests WHERE test_id IS NULL Empty set <> "empty column" Martijn Tonies Database Workbench - tool for InterBase, Firebird, MySQL, NexusDB, Oracle & MS SQL Server Upscene Productions ht

Re: Performance of different length/size datatypes

2006-10-31 Thread Paul McCullagh
Just wondering: this link seems to refer to Firebird/InterBase, not MySQL. In particular, MySQL stores Blobs "in row", the text describes the "out of row" storage of Blobs. As a result, I don't think there is much difference in the performance of BLOB and VARCHAR(255) in MySQL (VARCHAR is