Re: slow in statement?

2008-11-10 Thread Ananda Kumar
it should not cause any issues, unless your passing too many values in id
in(1,2,...n).
Are the indexes present.


On 11/10/08, Alex K [EMAIL PROTECTED] wrote:

 Hello,

 It seems to me that the statement id in (id1, id2 ... idn) is much
 slower than id=id1 or id=id2 ... or id=idn or I am doing something
 wrong?

 Thank you,

 Alex

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]




Re: slow in statement?

2008-11-10 Thread Alex K
Hi Ananda,

Indexes are present. I'm passing no more 10 values.

Alex

2008/11/10 Ananda Kumar [EMAIL PROTECTED]:
 it should not cause any issues, unless your passing too many values in id
 in(1,2,...n).
 Are the indexes present.


 On 11/10/08, Alex K [EMAIL PROTECTED] wrote:

 Hello,

 It seems to me that the statement id in (id1, id2 ... idn) is much
 slower than id=id1 or id=id2 ... or id=idn or I am doing something
 wrong?

 Thank you,

 Alex

 --
 MySQL General Mailing List
 For list archives: http://lists.mysql.com/mysql
 To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: slow in statement?

2008-11-10 Thread Ananda Kumar
can u please show me the explain plan for this sql and also the table
structure

explain select statement

desc table_name


On 11/10/08, Alex K [EMAIL PROTECTED] wrote:

 Hi Ananda,

 Indexes are present. I'm passing no more 10 values.

 Alex

 2008/11/10 Ananda Kumar [EMAIL PROTECTED]:
  it should not cause any issues, unless your passing too many values in
 id
  in(1,2,...n).
  Are the indexes present.
 
 
  On 11/10/08, Alex K [EMAIL PROTECTED] wrote:
 
  Hello,
 
  It seems to me that the statement id in (id1, id2 ... idn) is much
  slower than id=id1 or id=id2 ... or id=idn or I am doing something
  wrong?
 
  Thank you,
 
  Alex
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 
 



[ANN] PBXT 1.0.06 Beta Released

2008-11-10 Thread Paul McCullagh

Hi All,

On friday we released the second Beta version of PBXT. PBXT is a  
transactional storage engine for MySQL 5.1 and 6.0. You can find out  
more about the engine at http://www.primebase.org.


PBXT is pluggable, so it can be built separately from the MySQL tree,  
and loaded dynamically at runtime using the LOAD PLUGIN statement.


You can download PBXT from here: http://www.primebase.org/download. A  
quick guide to building and installing the plugin is provided. I  
have also updated the documentation for this version.


There are no major new features in this release because we are working  
towards the RC version. But we wrote some release notes (http://www.primebase.org/download/ChangeLog 
) to prove we have been busy :)


There is now also a version of PBXT available for Drizzle: http:// 
http://drizzleproject.org. You will find the source code here: https://code.launchpad.net/ 
~drizzle-pbxt/drizzle/pbxt.


Please e-mail me if you have any questions or if you need help with  
PBXT. Bugs reports can be submitted on Launchpad: https://bugs.launchpad.net/pbxt 
.


Best regards,

Paul



--
Paul McCullagh
PrimeBase Technologies
www.primebase.org
www.blobstreaming.org
pbxt.blogspot.com




--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



slow in statement?

2008-11-10 Thread Alex K
Hello,

It seems to me that the statement id in (id1, id2 ... idn) is much
slower than id=id1 or id=id2 ... or id=idn or I am doing something
wrong?

Thank you,

Alex

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: slow in statement?

2008-11-10 Thread Alex K
Here we go:

http://pastebin.com/m2439985d

replace $company_ids by list of ids from 'companies'
replace $neg_company_ids by -1 * $company_ids
replace $location_ids by list of location ids from 'locations'
replace $all_company_ids by list of ids from 'all_companies'

The reason why I'm doing $neg_company_ids is because I want to
differentiate between ids from 'companies' and from ids
'all_companies'.
So I noticed that when I replace the in statements by ors, it is
actually faster.

Thank you so much.

2008/11/10 Ananda Kumar [EMAIL PROTECTED]:
 can u please show me the explain plan for this sql and also the table
 structure

 explain select statement

 desc table_name


 On 11/10/08, Alex K [EMAIL PROTECTED] wrote:

 Hi Ananda,

 Indexes are present. I'm passing no more 10 values.

 Alex

 2008/11/10 Ananda Kumar [EMAIL PROTECTED]:
  it should not cause any issues, unless your passing too many values in
 id
  in(1,2,...n).
  Are the indexes present.
 
 
  On 11/10/08, Alex K [EMAIL PROTECTED] wrote:
 
  Hello,
 
  It seems to me that the statement id in (id1, id2 ... idn) is much
  slower than id=id1 or id=id2 ... or id=idn or I am doing something
  wrong?
 
  Thank you,
 
  Alex
 
  --
  MySQL General Mailing List
  For list archives: http://lists.mysql.com/mysql
  To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]
 
 
 



-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Is it a bug or my mistake in server configuration?

2008-11-10 Thread Alexey Vlasov
Hi.

One client from my shared hosting periodically informs me about an
error:

DBI connect('database,...)
failed: Can't create a new thread (errno 12); if you are not out of
available memory, you can consult the manual for a possible OS-dependent
bug at ...

There's nothing suspicious in the MySQL error-log.

# free -m
total   usedfree sharedbuffers cached
mem:16039  15794 245  0   2109   6935

-/+buffs/cache: 6748 9290
Swap:28615  502123594

my.cnf:
flush_time = 1800
set-variable = long_query_time=10

set-variable = back_log=1024
set-variable = max_connect_errors=1000
set-variable = max_connections=64
set-variable = connect_timeout=20
set-variable = wait_timeout=600
set-variable = interactive_timeout=600

set-variable = table_cache=1000
set-variable = thread_cache_size=16
set-variable = max_tmp_tables=8192
set-variable = max_heap_table_size=64M
set-variable = tmp_table_size=256M
set-variable = max_join_size=5000

set-variable = key_buffer_size=512M
set-variable = read_buffer_size=128K
set-variable = read_rnd_buffer_size=64K
set-variable = sort_buffer=128M
set-variable = join_buffer_size=64M
set-variable = net_buffer_length=64K

set-variable = query_cache_type=1
set-variable = query_cache_size=256M

set-variable = max_allowed_packet=16M
set-variable = ft_min_word_len=3

# ulimit -a
core file size  (blocks, -c) 0
data seg size   (kbytes, -d) 2097152
scheduling priority (-e) 0
file size   (blocks, -f) unlimited
pending signals (-i) 143360
max locked memory   (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files  (-n) 1024
pipe size(512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority  (-r) 0
stack size  (kbytes, -s) 8192
cpu time   (seconds, -t) unlimited
max user processes  (-u) 143360
virtual memory  (kbytes, -v) 4194304
file locks  (-x) unlimited

# ps
  PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
 4728 mysql 20   0 2045m 1.0g 5620 S0  6.3   2602:15 mysqld

# pstree | grep mysql
 |-mysqld---29*[{mysqld}]

# mysql --version
mysql  Ver 14.12 Distrib 5.0.54, for pc-linux-gnu (x86_64) using
readline 5.2

# uname -a
Linux 2.6.24 #4 SMP Fri Feb 29 20:10:01 MSK 2008
x86_64 Intel(R) Xeon(R) CPU E5345 @ 2.33GHz GenuineIntel GNU/Linux

I would like to know against what limit rests MySQL and whose mistake it
really is, of Perl mysql-client, mysqld or someone else?

-- 
BRGDS. Alexey Vlasov.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Is it a bug or my mistake in server configuration?

2008-11-10 Thread Curtis Maurand


I've been having the same trouble in a Xen virtual machine.  After about 
an hour and a half, mysql will be consuming 100% of cpu.  There is 
nothing wrong with the tables.  I'm assuming its a dynamic vs. fix 
amount of memory available to mysql.  I'm guaranteed x amount of ram, 
but that might get reduced due to server load.  I'm assuming mysql 
doesn't like having ram taken away from it and get into a tizzy about it.


I've been forced to restart mysql hourly in order to get smooth operation.

--curtis

Alexey Vlasov wrote:

Hi.

One client from my shared hosting periodically informs me about an
error:

DBI connect('database,...)
failed: Can't create a new thread (errno 12); if you are not out of
available memory, you can consult the manual for a possible OS-dependent
bug at ...

There's nothing suspicious in the MySQL error-log.

# free -m
total   usedfree sharedbuffers cached
mem:16039  15794 245  0   2109   6935

-/+buffs/cache: 6748 9290
Swap:28615  502123594

my.cnf:
flush_time = 1800
set-variable = long_query_time=10

set-variable = back_log=1024
set-variable = max_connect_errors=1000
set-variable = max_connections=64
set-variable = connect_timeout=20
set-variable = wait_timeout=600
set-variable = interactive_timeout=600

set-variable = table_cache=1000
set-variable = thread_cache_size=16
set-variable = max_tmp_tables=8192
set-variable = max_heap_table_size=64M
set-variable = tmp_table_size=256M
set-variable = max_join_size=5000

set-variable = key_buffer_size=512M
set-variable = read_buffer_size=128K
set-variable = read_rnd_buffer_size=64K
set-variable = sort_buffer=128M
set-variable = join_buffer_size=64M
set-variable = net_buffer_length=64K

set-variable = query_cache_type=1
set-variable = query_cache_size=256M

set-variable = max_allowed_packet=16M
set-variable = ft_min_word_len=3

# ulimit -a
core file size  (blocks, -c) 0
data seg size   (kbytes, -d) 2097152
scheduling priority (-e) 0
file size   (blocks, -f) unlimited
pending signals (-i) 143360
max locked memory   (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files  (-n) 1024
pipe size(512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority  (-r) 0
stack size  (kbytes, -s) 8192
cpu time   (seconds, -t) unlimited
max user processes  (-u) 143360
virtual memory  (kbytes, -v) 4194304
file locks  (-x) unlimited

# ps
  PID USER  PR  NI  VIRT  RES  SHR S %CPU %MEMTIME+  COMMAND
 4728 mysql 20   0 2045m 1.0g 5620 S0  6.3   2602:15 mysqld

# pstree | grep mysql
 |-mysqld---29*[{mysqld}]

# mysql --version
mysql  Ver 14.12 Distrib 5.0.54, for pc-linux-gnu (x86_64) using
readline 5.2

# uname -a
Linux 2.6.24 #4 SMP Fri Feb 29 20:10:01 MSK 2008
x86_64 Intel(R) Xeon(R) CPU E5345 @ 2.33GHz GenuineIntel GNU/Linux

I would like to know against what limit rests MySQL and whose mistake it
really is, of Perl mysql-client, mysqld or someone else?

  


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



[Fwd: Re: Is it a bug or my mistake in server configuration?]

2008-11-10 Thread Uwe Kiewel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

This mailing list has a stupid configuration. Pressing the answer
button, the message goes to the sender not to the list :-(

-  Original-Nachricht 
Betreff: Re: Is it a bug or my mistake in server configuration?
Datum: Mon, 10 Nov 2008 18:36:34 +0100
Von: Uwe Kiewel [EMAIL PROTECTED]
An: Alexey Vlasov [EMAIL PROTECTED]
Referenzen: [EMAIL PROTECTED]

Alexey Vlasov schrieb:
 open files  (-n) 1024


just a shot to the blue:

can you count your open files with lsof?

HTH,
Uwe
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIcBAEBAgAGBQJJGHG8AAoJEEJXG7BUuynnycwP/1SB9O7u8toxRYcRbctfwbdV
EnycPRk9k2meEEWEFNCqr/lQr3qzZL9BEj8HrMUnSqOSgkKKFS/XeqkIsUK+BZzp
2lV6zjD+wAtlM++O5BYYlQZ1JRgtk6rEkf+qWYQvRqbGOuQsSZ9UBqb7trUhbumF
7GsygytsUhT9aDmOlHoanlQ0VDQl+QvxKMVgtyu78s3CR7tMihSVxGdfC0A5Ws02
mlGdhxs/BgQsKuuSjLFar8Ok+Ad8g+lYhz5a2Tf8JTidYOBx1SAJoXC4R5MpRipp
AUwfcMe3w7VaNZ47L+Sh20hYyQpYDCNiyBX371uMWE7Yizbm6ddDd1JZ3jkv8NdL
N/9uLLLu14OIkYbC5TYJT84F9WlmvDtQiLTIl71LYjlPQdlEHsPs65+I5Pdmvt5V
0MfC2Weob0JUmzNBV/x03XfSUbEvXaScTdJa+DEV5+QNEnxxlRP45QVow+kfLMkQ
gB7jvFfIkpjhUsfkaofH83f8wBGXT1AD257blb8X/M1lkLpWjh81xsBFDmfKacXt
xu4St/VW59GESPbQaIkU5lcm/d/e93wY3xNIYtxnPsZ50pGv6PCszdI8N7Uu5UHQ
KrYXO8G8Bi4unI9i1bfPSJUyfFErWGesiqYopydt5idvyfPJA9E2aKtqTXqHfDc9
m0XjbWeBv2JXC8R04byE
=vQC5
-END PGP SIGNATURE-

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



how to generate the following output in sql ?

2008-11-10 Thread Supratim Bandyopadhyaya
I am really really new to sql,please forgive my
ignorence.

here is my problem

I have this table named mis_outtrack

desc mis_outtrack;
+-+-+--+-+-+---+
| Field   | Type| Null | Key | Default | Extra |
+-+-+--+-+-+---+
| pub_code| varchar(3)  | YES  | | NULL|   |
| status_flag | varchar(2)  | YES  | | NULL|   |
| user_id | varchar(15) | YES  | | NULL|   |
| entry_date  | date| YES  | | NULL|   |
| pub_date| date| YES  | | NULL|   |
+-+-+--+-+-+---+

select * from mis_outtrack;
+--+-+-+++
| pub_code | status_flag | user_id | entry_date | pub_date   |
+--+-+-+++
| SND  | RE  | AMY | 2008-11-01 | 2008-11-01 |
| SND  | AU  | AMY | 2008-11-05 | 2008-11-01 |
| SND  | SE  | AMY | 2008-11-10 | 2008-11-01 |
| MND  | RE  | AMY | 2008-11-03 | 2008-11-02 |
| MND  | AU  | AMY | 2008-11-15 | 2008-11-02 |
| MND  | SE  | AMY | 2008-11-15 | 2008-11-02 |
+--+-+-+++

here pub_code is short name for a particular news paper
useid is the user who is updating the records
pub_date is the date of publication of that news paper
and
entry_date is the date when the user is updating the inserting
the status of that publication

here RE means recieved
 AU means audited
 SE means send
   there can only be these three status flags


I have to write an sql to display this data in the following format

pub_code  |entry_date  |entry_date|entry_date|pub_date   |
(for a |(when |(when|(when
|(publication   |
particular   |status was RE)|status was AU)|status was SE |date for   |
pub_code) |  |  |  |that news paper|

|  SND2008-11-012008-11-05 2008-11-102008-11-01
|  MND2008-11-032008-11-15 2008-11-15
2008-11-02
|
|


how can I do this in sql


 any help will be appriciated.

Thanks in advance


MySQL University session on November 13: MySQL and openSolaris

2008-11-10 Thread Stefan Hinz
This Thursday (November 13, 2008), Martin MC Brown will give an
overview of MySQL on openSolaris. MC is an expert on MySQL and Solaris,
and has helped the openSolaris team to port MySQL to that platform. The
session will start at 14:00 UTC/BST (15:00 CET).

MySQL University is an educational program run virtually on the 'net.
Sessions are open to anyone. MySQL University focuses on MySQL internals
and on Sun technology that can be used in connection with MySQL, but
we're open to hear your suggestions for other topics.

We'll be using the Dimdim conferencing system for this session. Dimdim
has integrated voice streaming and chat. To attend, you need a browser
with a recent Flash plugin. You may register a Dimdim account but you
don't have to. The virtual meeting room will open 15 minutes before the
hour. Point your browser to this URL:
http://webmeeting.dimdim.com:80/portal/[EMAIL PROTECTED]

Related URLs:
- MySQL University: http://forge.mysql.com/wiki/MySQL_University
- http://forge.mysql.com/wiki/MySQL_and_OpenSolaris

Here's the MySQL University schedule for the remainder of 2008:

November 13 - 14:00 UTC / 14:00 BST / 15:00 CET - MySQL and
OpenSolaris - MC Brown

November 20 - 14:00 UTC / 14:00 BST / 15:00 CET - Using
memcached in MySQL deployments - MC Brown

December 4 - 14:00 UTC / 14:00 BST / 15:00 CET - What's New in
MySQL Optimizer - Sergey Petrunia

December 11 - 14:00 UTC / 14:00 BST / 15:00 CET - Random Query
Generator - Philip Stoev

December 18 - 14:00 UTC / 14:00 BST / 15:00 CET - Developing MySQL on
Solaris - Trond Norbye

Cheers,

Stefan
-- 
***
Sun Microsystems GmbHStefan Hinz
Sonnenallee 1Manager Documentation, Database Group
85551 Kirchheim-Heimstetten  Phone: +49-30-82702940
Germany  Fax:   +49-30-82702941
http://www.sun.de/mysql  mailto: [EMAIL PROTECTED]

Amtsgericht Muenchen: HRB161028
Geschaeftsfuehrer: Thomas Schroeder, Wolfgang Engels, Dr. Roland Boemer
Vorsitzender des Aufsichtsrates: Martin Haering
***









-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Is it a bug or my mistake in server configuration?

2008-11-10 Thread Uwe Kiewel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Curtis Maurand schrieb:
 
 I've been having the same trouble in a Xen virtual machine.  After about
 an hour and a half, mysql will be consuming 100% of cpu.  There is
 nothing wrong with the tables.  I'm assuming its a dynamic vs. fix
 amount of memory available to mysql.  I'm guaranteed x amount of ram,
 but that might get reduced due to server load.  I'm assuming mysql
 doesn't like having ram taken away from it and get into a tizzy about it.
 
 I've been forced to restart mysql hourly in order to get smooth operation.

You are dealing with the impact, not with the reason. It can only be a
workaround.

Did you have a look at you machine regarding paging activity?

Uwe
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIcBAEBAgAGBQJJGHNwAAoJEEJXG7BUuynnZLwP/j2DaZ4ffqvQDXJm9xhpR8RR
IX/X4eycsa42PAGCmvRkD10WgxTzTdIBA8euNX56sY8nS9GWanUzrBJ2fzmb6BKF
Ype1HnyQfBjktTlAnb/WMZ0GfwTyL9+xPcD22lpaDSp4wlPvCq11TWMBDHC7HO3s
7VIMz44FTrgeiuNFOCv5ZPLRY1yIonJm7aJpUOdJE329zQmkkECOi7E0dQTGH9hi
F5MWaymhIG4OrULiVbo+rBTzAhzHRYE7pv7y/q07vVLLpJ4mIM/9gBVS+p5ovrZE
yskucJyvoMx9YUNx22iSUp5NhoA67RS2Ov5y1JdeVeKzFGIsxRziYx2BNXWJo+zl
iY8XI5bcB2rx9wbmDqA413MyM/EdLlNmAUbwc4QnzIQLf7+cJ2u93FiZ0gtsNjWb
d/r+thxO6EpOlnrkt9vn4pe9Rjp/7KYAOSTJz+FG2CP9fkpnrArMSoegDIZFxE6T
s3NLmD5pPMdl1piwL5488F4f+AYuH5UNiZTOvbMr6NnQ9WL5LB1mDjRF+4/+BiW7
9nyfr7XcIdMWlED9dNR0fXU9rnbhi/ZOJhJbMFMKJaPPmZW6+cd7G5yqBe3UOGAd
3JD2IVPIz2NkpI1kGo4XnqxdAZS2/MXavDTVB+1tMOjMSkkJN5bkwRitZai9rb3Z
Ca2df0HdK0T7tIC1Kxmq
=5Xsj
-END PGP SIGNATURE-

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: [Fwd: Re: Is it a bug or my mistake in server configuration?]

2008-11-10 Thread Andy Shellam



This mailing list has a stupid configuration. Pressing the answer
button, the message goes to the sender not to the list :-(
  


Hint - use Reply to All - it's not specific to this mailing list. :-)

Regards,
Andy

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: how to generate the following output in sql ?

2008-11-10 Thread Olexandr Melnyk
Helllo Supratim,

does each pub_code appear maximum three times in the table?

2008/11/10, Supratim Bandyopadhyaya [EMAIL PROTECTED]:

 I am really really new to sql,please forgive my
 ignorence.

 here is my problem

 I have this table named mis_outtrack

 desc mis_outtrack;
 +-+-+--+-+-+---+
 | Field   | Type| Null | Key | Default | Extra |
 +-+-+--+-+-+---+
 | pub_code| varchar(3)  | YES  | | NULL|   |
 | status_flag | varchar(2)  | YES  | | NULL|   |
 | user_id | varchar(15) | YES  | | NULL|   |
 | entry_date  | date| YES  | | NULL|   |
 | pub_date| date| YES  | | NULL|   |
 +-+-+--+-+-+---+

 select * from mis_outtrack;
 +--+-+-+++
 | pub_code | status_flag | user_id | entry_date | pub_date   |
 +--+-+-+++
 | SND  | RE  | AMY | 2008-11-01 | 2008-11-01 |
 | SND  | AU  | AMY | 2008-11-05 | 2008-11-01 |
 | SND  | SE  | AMY | 2008-11-10 | 2008-11-01 |
 | MND  | RE  | AMY | 2008-11-03 | 2008-11-02 |
 | MND  | AU  | AMY | 2008-11-15 | 2008-11-02 |
 | MND  | SE  | AMY | 2008-11-15 | 2008-11-02 |
 +--+-+-+++

 here pub_code is short name for a particular news paper
 useid is the user who is updating the records
 pub_date is the date of publication of that news paper
 and
 entry_date is the date when the user is updating the inserting
 the status of that publication

 here RE means recieved
  AU means audited
  SE means send
there can only be these three status flags


 I have to write an sql to display this data in the following format
 
 pub_code  |entry_date  |entry_date|entry_date|pub_date   |
 (for a |(when |(when|(when
 |(publication   |
 particular   |status was RE)|status was AU)|status was SE |date for   |
 pub_code) |  |  |  |that news paper|
 
 |  SND2008-11-012008-11-05 2008-11-102008-11-01
 |  MND2008-11-032008-11-15 2008-11-15
 2008-11-02
 |
 |


 how can I do this in sql


   any help will be appriciated.

 Thanks in advance




-- 
Sincerely yours,
Olexandr Melnyk
http://omelnyk.net/


Re: [Fwd: Re: Is it a bug or my mistake in server configuration?]

2008-11-10 Thread John Daisley
Hit 'Reply to All' instead of reply.


On Mon, 2008-11-10 at 18:39 +0100, Uwe Kiewel wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 This mailing list has a stupid configuration. Pressing the answer
 button, the message goes to the sender not to the list :-(
 
 -  Original-Nachricht 
 Betreff: Re: Is it a bug or my mistake in server configuration?
 Datum: Mon, 10 Nov 2008 18:36:34 +0100
 Von: Uwe Kiewel [EMAIL PROTECTED]
 An: Alexey Vlasov [EMAIL PROTECTED]
 Referenzen: [EMAIL PROTECTED]
 
 Alexey Vlasov schrieb:
  open files  (-n) 1024
 
 
 just a shot to the blue:
 
 can you count your open files with lsof?
 
 HTH,
   Uwe
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
 iQIcBAEBAgAGBQJJGHG8AAoJEEJXG7BUuynnycwP/1SB9O7u8toxRYcRbctfwbdV
 EnycPRk9k2meEEWEFNCqr/lQr3qzZL9BEj8HrMUnSqOSgkKKFS/XeqkIsUK+BZzp
 2lV6zjD+wAtlM++O5BYYlQZ1JRgtk6rEkf+qWYQvRqbGOuQsSZ9UBqb7trUhbumF
 7GsygytsUhT9aDmOlHoanlQ0VDQl+QvxKMVgtyu78s3CR7tMihSVxGdfC0A5Ws02
 mlGdhxs/BgQsKuuSjLFar8Ok+Ad8g+lYhz5a2Tf8JTidYOBx1SAJoXC4R5MpRipp
 AUwfcMe3w7VaNZ47L+Sh20hYyQpYDCNiyBX371uMWE7Yizbm6ddDd1JZ3jkv8NdL
 N/9uLLLu14OIkYbC5TYJT84F9WlmvDtQiLTIl71LYjlPQdlEHsPs65+I5Pdmvt5V
 0MfC2Weob0JUmzNBV/x03XfSUbEvXaScTdJa+DEV5+QNEnxxlRP45QVow+kfLMkQ
 gB7jvFfIkpjhUsfkaofH83f8wBGXT1AD257blb8X/M1lkLpWjh81xsBFDmfKacXt
 xu4St/VW59GESPbQaIkU5lcm/d/e93wY3xNIYtxnPsZ50pGv6PCszdI8N7Uu5UHQ
 KrYXO8G8Bi4unI9i1bfPSJUyfFErWGesiqYopydt5idvyfPJA9E2aKtqTXqHfDc9
 m0XjbWeBv2JXC8R04byE
 =vQC5
 -END PGP SIGNATURE-
 


Re: [Fwd: Re: Is it a bug or my mistake in server configuration?]

2008-11-10 Thread Uwe Kiewel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Andy Shellam schrieb:
 
 This mailing list has a stupid configuration. Pressing the answer
 button, the message goes to the sender not to the list :-(
   
 
 Hint - use Reply to All - it's not specific to this mailing list. :-)
 

It dosn't make sense to the a reply to the list and the sender.

The described procedure works fine at other mailing lists...


-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIcBAEBAgAGBQJJGHZ5AAoJEEJXG7BUuynnwFEQAJYxmcj886VULbzqY11cIm27
gCBC1B5eJetycUbFBnJhJew7yes8dbgHXIm6xpY79A0pX0O4+Gf4cyaYI42y2MHV
K3DDaWbZkWJRnpihtW3We6k9CX5u+tufx/eejx+o2Yq+uPpmU/BeG7pC/r/YDkMu
kZ/MLMZSRswD/mmRNHWixu2TT6iYEdrreeSmV1LGCwUirqaG1fDx/jxc6HvkdcmC
XofeipmjPLdOMZ+Mr2xTYwo5jWXekx1Ynp6vV8PJacFgl/Hw8/LJk0FU+Nt8J5Kv
1P2UGqQ3bxGaTyiGNyqK3ZQIDUw1d1tHWP7wTEkNYs18GlXaX7xtACtqlZUG3zxN
qtfHtT5Ksvn//7WoiNG6t4wY56pkgIiitOhwVmBydqok5zw7uHaRgpiykc8jEV5N
rh7CtuuPPpVtauU4gI5lLvDNF1MQ+53srNeLx63UNTIABsu0IPtaISNDuspg6o2V
Fq5nxWi9K07GdwAPRjoarZ+wVNtG8xaO90tz8EaMUqLu1fLvcU3168j4oYfQ/oR7
ePGTUtzTP26uTMqZ/O5uPn+eirz0j2s4P28EvwSGflYZPKAyi3AfNlDeGwB4XWbP
2VUKPPLHVqvMpwFKUTlfCrrY2bPl6ESEycDSD3DROW5uZbZlc0hMJ1NAK5XQQVTR
cDvOtAG4Ku1NO3tE+P22
=gf+z
-END PGP SIGNATURE-

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



MySQL 5.1.29 and OPTIMIZE

2008-11-10 Thread Mariella Petrini
Hi All,


I have used MySQL 5.1.29 and I would like to ask a question related to InnoDB 
and row_format=COMPACT and OPTIMIZE

Why when trying to run OPTMIZE on InnoDB  table with row_format=compact
it displays Table does not support optimize, doing recreate + analyze instead 
?




+--+--+--+---+
| Table| Op   | Msg_type | Msg_text 
 |
+--+--+--+---+
| table1 | optimize | note | Table does not support optimize, doing 
recreate + analyze instead | 
| table1 | optimize | status   | OK 
   | 
+--+--+--+---+


Thanks for your help,

Mariella


  

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: [Fwd: Re: Is it a bug or my mistake in server configuration?]

2008-11-10 Thread John Daisley
Make sure the script or application querying the database is closing
connections when it has finished with them. Theres an awful lot of badly
coded scripts out there, especially php scripts, which keep the
connections to the server open and eating away at server resources long
after they could have released the thread back to the server.













On Mon, 2008-11-10 at 18:39 +0100, Uwe Kiewel wrote:

 -BEGIN PGP SIGNED MESSAGE-
 Hash: SHA1
 
 This mailing list has a stupid configuration. Pressing the answer
 button, the message goes to the sender not to the list :-(
 
 -  Original-Nachricht 
 Betreff: Re: Is it a bug or my mistake in server configuration?
 Datum: Mon, 10 Nov 2008 18:36:34 +0100
 Von: Uwe Kiewel [EMAIL PROTECTED]
 An: Alexey Vlasov [EMAIL PROTECTED]
 Referenzen: [EMAIL PROTECTED]
 
 Alexey Vlasov schrieb:
  open files  (-n) 1024
 
 
 just a shot to the blue:
 
 can you count your open files with lsof?
 
 HTH,
   Uwe
 -BEGIN PGP SIGNATURE-
 Version: GnuPG v1.4.9 (MingW32)
 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
 
 iQIcBAEBAgAGBQJJGHG8AAoJEEJXG7BUuynnycwP/1SB9O7u8toxRYcRbctfwbdV
 EnycPRk9k2meEEWEFNCqr/lQr3qzZL9BEj8HrMUnSqOSgkKKFS/XeqkIsUK+BZzp
 2lV6zjD+wAtlM++O5BYYlQZ1JRgtk6rEkf+qWYQvRqbGOuQsSZ9UBqb7trUhbumF
 7GsygytsUhT9aDmOlHoanlQ0VDQl+QvxKMVgtyu78s3CR7tMihSVxGdfC0A5Ws02
 mlGdhxs/BgQsKuuSjLFar8Ok+Ad8g+lYhz5a2Tf8JTidYOBx1SAJoXC4R5MpRipp
 AUwfcMe3w7VaNZ47L+Sh20hYyQpYDCNiyBX371uMWE7Yizbm6ddDd1JZ3jkv8NdL
 N/9uLLLu14OIkYbC5TYJT84F9WlmvDtQiLTIl71LYjlPQdlEHsPs65+I5Pdmvt5V
 0MfC2Weob0JUmzNBV/x03XfSUbEvXaScTdJa+DEV5+QNEnxxlRP45QVow+kfLMkQ
 gB7jvFfIkpjhUsfkaofH83f8wBGXT1AD257blb8X/M1lkLpWjh81xsBFDmfKacXt
 xu4St/VW59GESPbQaIkU5lcm/d/e93wY3xNIYtxnPsZ50pGv6PCszdI8N7Uu5UHQ
 KrYXO8G8Bi4unI9i1bfPSJUyfFErWGesiqYopydt5idvyfPJA9E2aKtqTXqHfDc9
 m0XjbWeBv2JXC8R04byE
 =vQC5
 -END PGP SIGNATURE-
 


Re: [Fwd: Re: Is it a bug or my mistake in server configuration?]

2008-11-10 Thread Uwe Kiewel
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

John Daisley schrieb:
 Hit 'Reply to All' instead of reply.
 

Is is okay for you the have your answers twice? If I post to a list, I
read that list. So there is no need to have the ansers at the list and
in my inbox

Uwe
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.9 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iQIcBAEBAgAGBQJJGHcCAAoJEEJXG7BUuynnKeIQAM0rb4PPOwIxwYClPNMUvTPN
chqL8Lpo9FmRdWaJof5TqguruXDhPyK8xLeH+XBKPa7d952BNqRCFdtBLIHsmtQk
GE7Z51E5puFWlKfZA9QC909juVNMPcKleTO0OCyHmhVX5NtazdVnrB4NR2RB0wFQ
IIKiwBOH0id+YipyT1S3wOy8oo1DkA46u5NX4AIp66J3JDl642k+tvyQyGP05fzq
47PuCRI0FK7e6+xUHj3eNScJQXNkr4hJWkGi92suFgPGchKYBjWCBDbJUoNNl/rb
QcpHOmC5TfUw1CCveb7CM6k8r10RNC02Q8BJTWKeYsc9PfR+lOdWLS7C/+nZjBr2
1rwZTYblAqOtzbokVvtQsPVol7b+hCiKZ5y8CGC+gmrr9GF0z/YHnspHnKiIDTS3
4IHMvVtZpjJu31S9Ywrsp7urQ947w32yM0vsCF2gxhCMV8gdZPoFBEwAyjx2mKDP
JDEQ8eF5YQ18QEAEVoGgFHhQEsgup6OmbbQi415116pEiFCbJURkQLss9Qq7Cay4
2UHLuwkus6oEiC8Go1OPv67ZQ++0+lB9cd7GLZdBL1vwHLtzPRExBYLFp7ygP4yh
+r6TqwmoUUNYwIRdFLcOcE8jMhqlAlwONmASWgkVsV8UzopSEKWjcI8EYoravqH1
3iA04LVzUbVnttppgbdB
=RNS0
-END PGP SIGNATURE-

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Is it a bug or my mistake in server configuration?

2008-11-10 Thread Alexey Vlasov
On Mon, Nov 10, 2008 at 06:36:34PM +0100, Uwe Kiewel wrote:
 Alexey Vlasov schrieb:
 open files  (-n) 1024
 
 just a shot to the blue:
 
 can you count your open files with lsof?

# lsof -u mysql | wc -l
1719

I doubt that the problem is in that otherwise every second user would
complain of some errors, and now only 1 from about 2000 users of this
server complains.

-- 
BRGDS. Alexey Vlasov.

-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Primary key / foreign key question

2008-11-10 Thread Steve Grosz

Ok, I'm a little new a this, so be gentle!! :)

I was looking into the InnoDB engine for some tables I have, and would like 
to use the PK/FK on some of the data.


It appears that the PK/FK is mainly used for updating/deleting data, 
correct?  I can't use it to retreive data from multiple tables and have them 
linked, other than a join?  Or am I wrong?


Is there a good visual tool that I can use to build my tables, create the 
PK/FK definations, and test how inserts, deletes, updates affect all the 
tables involved?? 



--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]



Re: Primary key / foreign key question

2008-11-10 Thread Martijn Tonies
Hello Steve,

 Ok, I'm a little new a this, so be gentle!! :)

 I was looking into the InnoDB engine for some tables I have, and would
like
 to use the PK/FK on some of the data.

 It appears that the PK/FK is mainly used for updating/deleting data,
 correct?  I can't use it to retreive data from multiple tables and have
them
 linked, other than a join?  Or am I wrong?

It's mainly used for generating exceptions when the data is about to
become invalid if you delete something that is used by another table.
You can set it to automatically delete child-data or prevent these
deletions so that the data in your database stays consistent.

When retrieving data, you need to JOIN tables yourself into a result set.

Alternatively, you can create a server side object called a VIEW that
is basically a result set that looks like a single table.

 Is there a good visual tool that I can use to build my tables, create the
 PK/FK definations, and test how inserts, deletes, updates affect all the
 tables involved??

What OS? For example, on Windows, we offer a free Lite version of
our developer tool Database Workbench.

Martijn Tonies
Database Workbench Lite for MySQL - FREE developer tool for MySQL!
Upscene Productions
http://www.upscene.com
My thoughts:
http://blog.upscene.com/martijn/
Database development questions? Check the forum!
http://www.databasedevelopmentforum.com


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:http://lists.mysql.com/[EMAIL PROTECTED]