database-administration

In MySQL 'USE INDEX' is not working But 'FORCE Index' seems working fine

梦想的初衷 提交于 2021-02-11 12:24:41
问题 EXPLAIN EXTENDED SELECT * FROM table_name -- FORCE INDEX(dummy_date) USE INDEX(dummy_date) where dummy_date between '2020-12-01' AND '2020-12-31' AND name='something'; ALTER TABLE `table_name` ADD INDEX `dummy_date_index`(`dummy_date`) When I execute this query then indexing is not working but if I use force index then its working with index. Please let me know the correct approach to use the index for millions of rows. 回答1: Even better than MySQL not using indexes with WHERE IN clause? --

Cannot connect Access to SQL Server Linked Tables - error message loggingin

北战南征 提交于 2021-02-05 09:15:39
问题 I have a client for which I am setting up a new SQL Server Express and (on a different computer) connecting their Access front end to that SQL Server. I created an account on SQL Server, changed authentication to SQL Server. I am able to log on to that account with no issues locally (through SQL Server Management Studio) on the server itself, but when I go back to the client machine and try to create either an ODBC connection or connect directly in Linked Table manager, I get the error below.

org.apache.kafka.connect.errors.ConnectException: An exception occurred in the change event producer. This connector will be stopped

大兔子大兔子 提交于 2021-01-28 05:14:34
问题 Using postgres source connector in kafka. It works properly for some time and suddently stops with above error. Please assist if someone knows this issue. 回答1: This happens if the database is not available and the only way to fix it to restart the connector. I would advise you to check the database logs and see if database is going down or refusing connection to Kafka Connect 来源: https://stackoverflow.com/questions/60450498/org-apache-kafka-connect-errors-connectexception-an-exception

Getting a very bad performance with galera as compared to a standalone mariaDB server

三世轮回 提交于 2021-01-21 05:47:16
问题 I am getting an unacceptable low performance with the galera setup i created. In my setup there are 2 nodes in active-active and i am doing read/writes on both the nodes in a round robin fashion using HA-proxy load balancer. I was easily able to get over 10000 TPS on my application with the single mariadb server with the below configuration: 36 vpcu, 60 GB RAM, SSD, 10Gig dedicated pipe With galera i am hardly getting 3500 TPS although i am using 2 nodes(36vcpu, 60 GB RAM) of DB load balanced

How can I get the complete definition (sql) of system views like user_objects?

有些话、适合烂在心里 提交于 2020-06-17 00:50:28
问题 I want to get the complete SQL code of the system views like USER_OBJECTS. However, when I execute the query below, it returns an error saying view not found in the SYS schema. select dbms_metadata.get_ddl('VIEW', 'USER_OBJECTS', 'SYS') from dual; When I execute the query below, it returns some codes in the text_vc column, but not the complete one. I cannot see the tables and where clause etc. select * from ALL_VIEWS where VIEW_NAME = 'USER_OBJECTS'; But with this query, I can see that it is

Cannot drop PostgreSQL role. Error: `cannot be dropped because some objects depend on it`

烂漫一生 提交于 2020-06-09 16:53:08
问题 I was trying to delete PostgreSQL user: DROP USER ryan; I received this error: Error in query: ERROR: role "ryan" cannot be dropped because some objects depend on it DETAIL: privileges for database mydatabase I looked for a solution from these threads: PostgreSQL - how to quickly drop a user with existing privileges How to drop user in postgres if it has depending objects Still have the same error. This happens after I grant all permission to user "ryan" with: GRANT ALL PRIVILEGES ON DATABASE

how to change log_reuse_wait and log_reuse_wait_desc

老子叫甜甜 提交于 2020-01-25 01:59:53
问题 I have been created new database and the log file groth very past, and I get error mesaage that the log is full due to 'BACKUP'. I looked in the differences between this Database and other databases in the SERVER, and I seen that in all databases log_reuse_wait is 0 and log_reuse_wait_desc is NOTHING and in my database log_reuse_wait is 0 and log_reuse_wait_desc is LOG_BACKUP. I want to change this property in my database to 0 and NOTHING. How can I do that? 回答1: This is a read-only status

Quickest way to combine two identical structured tables without duplicate entries

蓝咒 提交于 2020-01-17 05:20:09
问题 I have two tables with the exact same structure/columns. I need to combine them without duplicates based on the second column (title). First column is ID and these may have duplicates but should be ignored. Example of database structure id (primary key, auto increment), title (unique), description, link Ex. Table 1 1 Bob thisisbob bob.com 2 Tom thisistom tom.com 3 Chad thisischad chad.com Ex. Table 2 1 Chris thisischris chris.com 2 Chad thisischad chad.com 3 Dough thisisdough doug.com What I