4Developers: Szymon Warda- Graph databases - why and howPROIDEA
Od podstaw teorii grafów, przez budowę, typy baz grafowych po zastosowania i wydajność. Pokażę na przykładach jak bardzo zróżnicowanym i innym światem jest świat baz grafowych oraz jak pewne problemy się w nim dużo łatwiej rozwiązuje. Porozmawiamy o wydajności baz grafowych i porównamy do wydajności SQL Servera. A przez całość szybki kurs języka do zapytań grafowych - Cypher.
Jak realizowana jest wielozadaniowość na pojedynczym CPU oraz jakie są jej konsekwencje? Czy “mutex to taki binarny semafor”? Dlaczego Windows nie jest używany do sterowania rakietami oraz jaki popularny błąd omal nie spowodował utraty jednej z misji NASA?
Nowości w zakresie bezpieczeństwa w SQL Server 2016Kamil Nowinski
Przechowywanie wrażliwych danych w bazie często wzbudza wiele wątpliwości. Co w sytuacji kiedy użytkownik uzyska bezpośredni dostęp i będzie mógł wykonać zapytanie zwracające więcej danych niż zobaczyłby w aplikacji?
Spośród zapowiedzianych nowości – SQL Server 2016 przynosi również ulepszenia w obszarze zabezpieczeń, które przedstawimy podczas naszej sesji.
Row Level Security – zabezpieczanie danych na poziomie wierszy to funkcjonalność na którą czeka wielu deweloperów T-SQL. Do tej pory stali oni przed koniecznością ukrywania części danych za pomocą widoków filtrujących źródłowe dane. SQL Server 2016 pozwala na ukrycie części rekordów przed użytkownikiem nawet w sytuacji w której ma on bezpośredni dostęp do tabel.
Chcesz pozwolić użytkownikom odczytywać wszystkie rekordy – ale w przypadku kolumn takich jak numer PESEL czy numer karty kredytowej chcesz aby mogli wyświetlić tylko kilka pierwszych cyfr? Umożliwi to kolejna nowa omawiana funkcjonalność – Dynamic Data Masking.
SQL Server 2008 Tips & tricks administracjiSQLExpert.pl
Sesja odbyła się 7 kwietnia 2009r na Wyższej Szkole Komunikacji i Zarządzania w Poznaniu z okazji IT Academic Day.
W ramach tej sesji przedstawiono różne nowości wersji SQL Server 2008 usprawniające pracę administratorom.
Między innymi mowa jest o Policy Based Management, Extended Events, SQL Audit czy też kompresji w SQL Server 2008.
4Developers: Szymon Warda- Graph databases - why and howPROIDEA
Od podstaw teorii grafów, przez budowę, typy baz grafowych po zastosowania i wydajność. Pokażę na przykładach jak bardzo zróżnicowanym i innym światem jest świat baz grafowych oraz jak pewne problemy się w nim dużo łatwiej rozwiązuje. Porozmawiamy o wydajności baz grafowych i porównamy do wydajności SQL Servera. A przez całość szybki kurs języka do zapytań grafowych - Cypher.
Jak realizowana jest wielozadaniowość na pojedynczym CPU oraz jakie są jej konsekwencje? Czy “mutex to taki binarny semafor”? Dlaczego Windows nie jest używany do sterowania rakietami oraz jaki popularny błąd omal nie spowodował utraty jednej z misji NASA?
Nowości w zakresie bezpieczeństwa w SQL Server 2016Kamil Nowinski
Przechowywanie wrażliwych danych w bazie często wzbudza wiele wątpliwości. Co w sytuacji kiedy użytkownik uzyska bezpośredni dostęp i będzie mógł wykonać zapytanie zwracające więcej danych niż zobaczyłby w aplikacji?
Spośród zapowiedzianych nowości – SQL Server 2016 przynosi również ulepszenia w obszarze zabezpieczeń, które przedstawimy podczas naszej sesji.
Row Level Security – zabezpieczanie danych na poziomie wierszy to funkcjonalność na którą czeka wielu deweloperów T-SQL. Do tej pory stali oni przed koniecznością ukrywania części danych za pomocą widoków filtrujących źródłowe dane. SQL Server 2016 pozwala na ukrycie części rekordów przed użytkownikiem nawet w sytuacji w której ma on bezpośredni dostęp do tabel.
Chcesz pozwolić użytkownikom odczytywać wszystkie rekordy – ale w przypadku kolumn takich jak numer PESEL czy numer karty kredytowej chcesz aby mogli wyświetlić tylko kilka pierwszych cyfr? Umożliwi to kolejna nowa omawiana funkcjonalność – Dynamic Data Masking.
SQL Server 2008 Tips & tricks administracjiSQLExpert.pl
Sesja odbyła się 7 kwietnia 2009r na Wyższej Szkole Komunikacji i Zarządzania w Poznaniu z okazji IT Academic Day.
W ramach tej sesji przedstawiono różne nowości wersji SQL Server 2008 usprawniające pracę administratorom.
Między innymi mowa jest o Policy Based Management, Extended Events, SQL Audit czy też kompresji w SQL Server 2008.
2024 State of Marketing Report – by HubspotMarius Sescu
https://www.hubspot.com/state-of-marketing
· Scaling relationships and proving ROI
· Social media is the place for search, sales, and service
· Authentic influencer partnerships fuel brand growth
· The strongest connections happen via call, click, chat, and camera.
· Time saved with AI leads to more creative work
· Seeking: A single source of truth
· TLDR; Get on social, try AI, and align your systems.
· More human marketing, powered by robots
ChatGPT is a revolutionary addition to the world since its introduction in 2022. A big shift in the sector of information gathering and processing happened because of this chatbot. What is the story of ChatGPT? How is the bot responding to prompts and generating contents? Swipe through these slides prepared by Expeed Software, a web development company regarding the development and technical intricacies of ChatGPT!
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
The realm of product design is a constantly changing environment where technology and style intersect. Every year introduces fresh challenges and exciting trends that mold the future of this captivating art form. In this piece, we delve into the significant trends set to influence the look and functionality of product design in the year 2024.
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
Mental health has been in the news quite a bit lately. Dozens of U.S. states are currently suing Meta for contributing to the youth mental health crisis by inserting addictive features into their products, while the U.S. Surgeon General is touring the nation to bring awareness to the growing epidemic of loneliness and isolation. The country has endured periods of low national morale, such as in the 1970s when high inflation and the energy crisis worsened public sentiment following the Vietnam War. The current mood, however, feels different. Gallup recently reported that national mental health is at an all-time low, with few bright spots to lift spirits.
To better understand how Americans are feeling and their attitudes towards mental health in general, ThinkNow conducted a nationally representative quantitative survey of 1,500 respondents and found some interesting differences among ethnic, age and gender groups.
Technology
For example, 52% agree that technology and social media have a negative impact on mental health, but when broken out by race, 61% of Whites felt technology had a negative effect, and only 48% of Hispanics thought it did.
While technology has helped us keep in touch with friends and family in faraway places, it appears to have degraded our ability to connect in person. Staying connected online is a double-edged sword since the same news feed that brings us pictures of the grandkids and fluffy kittens also feeds us news about the wars in Israel and Ukraine, the dysfunction in Washington, the latest mass shooting and the climate crisis.
Hispanics may have a built-in defense against the isolation technology breeds, owing to their large, multigenerational households, strong social support systems, and tendency to use social media to stay connected with relatives abroad.
Age and Gender
When asked how individuals rate their mental health, men rate it higher than women by 11 percentage points, and Baby Boomers rank it highest at 83%, saying it’s good or excellent vs. 57% of Gen Z saying the same.
Gen Z spends the most amount of time on social media, so the notion that social media negatively affects mental health appears to be correlated. Unfortunately, Gen Z is also the generation that’s least comfortable discussing mental health concerns with healthcare professionals. Only 40% of them state they’re comfortable discussing their issues with a professional compared to 60% of Millennials and 65% of Boomers.
Race Affects Attitudes
As seen in previous research conducted by ThinkNow, Asian Americans lag other groups when it comes to awareness of mental health issues. Twenty-four percent of Asian Americans believe that having a mental health issue is a sign of weakness compared to the 16% average for all groups. Asians are also considerably less likely to be aware of mental health services in their communities (42% vs. 55%) and most likely to seek out information on social media (51% vs. 35%).
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
This article is all about what AI trends will emerge in the field of creative operations in 2024. All the marketers and brand builders should be aware of these trends for their further use and save themselves some time!
A report by thenetworkone and Kurio.
The contributing experts and agencies are (in an alphabetical order): Sylwia Rytel, Social Media Supervisor, 180heartbeats + JUNG v MATT (PL), Sharlene Jenner, Vice President - Director of Engagement Strategy, Abelson Taylor (USA), Alex Casanovas, Digital Director, Atrevia (ES), Dora Beilin, Senior Social Strategist, Barrett Hoffher (USA), Min Seo, Campaign Director, Brand New Agency (KR), Deshé M. Gully, Associate Strategist, Day One Agency (USA), Francesca Trevisan, Strategist, Different (IT), Trevor Crossman, CX and Digital Transformation Director; Olivia Hussey, Strategic Planner; Simi Srinarula, Social Media Manager, The Hallway (AUS), James Hebbert, Managing Director, Hylink (CN / UK), Mundy Álvarez, Planning Director; Pedro Rojas, Social Media Manager; Pancho González, CCO, Inbrax (CH), Oana Oprea, Head of Digital Planning, Jam Session Agency (RO), Amy Bottrill, Social Account Director, Launch (UK), Gaby Arriaga, Founder, Leonardo1452 (MX), Shantesh S Row, Creative Director, Liwa (UAE), Rajesh Mehta, Chief Strategy Officer; Dhruv Gaur, Digital Planning Lead; Leonie Mergulhao, Account Supervisor - Social Media & PR, Medulla (IN), Aurelija Plioplytė, Head of Digital & Social, Not Perfect (LI), Daiana Khaidargaliyeva, Account Manager, Osaka Labs (UK / USA), Stefanie Söhnchen, Vice President Digital, PIABO Communications (DE), Elisabeth Winiartati, Managing Consultant, Head of Global Integrated Communications; Lydia Aprina, Account Manager, Integrated Marketing and Communications; Nita Prabowo, Account Manager, Integrated Marketing and Communications; Okhi, Web Developer, PNTR Group (ID), Kei Obusan, Insights Director; Daffi Ranandi, Insights Manager, Radarr (SG), Gautam Reghunath, Co-founder & CEO, Talented (IN), Donagh Humphreys, Head of Social and Digital Innovation, THINKHOUSE (IRE), Sarah Yim, Strategy Director, Zulu Alpha Kilo (CA).
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
The search marketing landscape is evolving rapidly with new technologies, and professionals, like you, rely on innovative paid search strategies to meet changing demands.
It’s important that you’re ready to implement new strategies in 2024.
Check this out and learn the top trends in paid search advertising that are expected to gain traction, so you can drive higher ROI more efficiently in 2024.
You’ll learn:
- The latest trends in AI and automation, and what this means for an evolving paid search ecosystem.
- New developments in privacy and data regulation.
- Emerging ad formats that are expected to make an impact next year.
Watch Sreekant Lanka from iQuanti and Irina Klein from OneMain Financial as they dive into the future of paid search and explore the trends, strategies, and technologies that will shape the search marketing landscape.
If you’re looking to assess your paid search strategy and design an industry-aligned plan for 2024, then this webinar is for you.
5 Public speaking tips from TED - Visualized summarySpeakerHub
From their humble beginnings in 1984, TED has grown into the world’s most powerful amplifier for speakers and thought-leaders to share their ideas. They have over 2,400 filmed talks (not including the 30,000+ TEDx videos) freely available online, and have hosted over 17,500 events around the world.
With over one billion views in a year, it’s no wonder that so many speakers are looking to TED for ideas on how to share their message more effectively.
The article “5 Public-Speaking Tips TED Gives Its Speakers”, by Carmine Gallo for Forbes, gives speakers five practical ways to connect with their audience, and effectively share their ideas on stage.
Whether you are gearing up to get on a TED stage yourself, or just want to master the skills that so many of their speakers possess, these tips and quotes from Chris Anderson, the TED Talks Curator, will encourage you to make the most impactful impression on your audience.
See the full article and more summaries like this on SpeakerHub here: https://speakerhub.com/blog/5-presentation-tips-ted-gives-its-speakers
See the original article on Forbes here:
http://www.forbes.com/forbes/welcome/?toURL=http://www.forbes.com/sites/carminegallo/2016/05/06/5-public-speaking-tips-ted-gives-its-speakers/&refURL=&referrer=#5c07a8221d9b
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
Everyone is in agreement that ChatGPT (and other generative AI tools) will shape the future of work. Yet there is little consensus on exactly how, when, and to what extent this technology will change our world.
Businesses that extract maximum value from ChatGPT will use it as a collaborative tool for everything from brainstorming to technical maintenance.
For individuals, now is the time to pinpoint the skills the future professional will need to thrive in the AI age.
Check out this presentation to understand what ChatGPT is, how it will shape the future of work, and how you can prepare to take advantage.
A brief introduction to DataScience with explaining of the concepts, algorithms, machine learning, supervised and unsupervised learning, clustering, statistics, data preprocessing, real-world applications etc.
It's part of a Data Science Corner Campaign where I will be discussing the fundamentals of DataScience, AIML, Statistics etc.
Time Management & Productivity - Best PracticesVit Horky
Here's my presentation on by proven best practices how to manage your work time effectively and how to improve your productivity. It includes practical tips and how to use tools such as Slack, Google Apps, Hubspot, Google Calendar, Gmail and others.
The six step guide to practical project managementMindGenius
The six step guide to practical project management
If you think managing projects is too difficult, think again.
We’ve stripped back project management processes to the
basics – to make it quicker and easier, without sacrificing
the vital ingredients for success.
“If you’re looking for some real-world guidance, then The Six Step Guide to Practical Project Management will help.”
Dr Andrew Makar, Tactical Project Management
2024 State of Marketing Report – by HubspotMarius Sescu
https://www.hubspot.com/state-of-marketing
· Scaling relationships and proving ROI
· Social media is the place for search, sales, and service
· Authentic influencer partnerships fuel brand growth
· The strongest connections happen via call, click, chat, and camera.
· Time saved with AI leads to more creative work
· Seeking: A single source of truth
· TLDR; Get on social, try AI, and align your systems.
· More human marketing, powered by robots
ChatGPT is a revolutionary addition to the world since its introduction in 2022. A big shift in the sector of information gathering and processing happened because of this chatbot. What is the story of ChatGPT? How is the bot responding to prompts and generating contents? Swipe through these slides prepared by Expeed Software, a web development company regarding the development and technical intricacies of ChatGPT!
Product Design Trends in 2024 | Teenage EngineeringsPixeldarts
The realm of product design is a constantly changing environment where technology and style intersect. Every year introduces fresh challenges and exciting trends that mold the future of this captivating art form. In this piece, we delve into the significant trends set to influence the look and functionality of product design in the year 2024.
How Race, Age and Gender Shape Attitudes Towards Mental HealthThinkNow
Mental health has been in the news quite a bit lately. Dozens of U.S. states are currently suing Meta for contributing to the youth mental health crisis by inserting addictive features into their products, while the U.S. Surgeon General is touring the nation to bring awareness to the growing epidemic of loneliness and isolation. The country has endured periods of low national morale, such as in the 1970s when high inflation and the energy crisis worsened public sentiment following the Vietnam War. The current mood, however, feels different. Gallup recently reported that national mental health is at an all-time low, with few bright spots to lift spirits.
To better understand how Americans are feeling and their attitudes towards mental health in general, ThinkNow conducted a nationally representative quantitative survey of 1,500 respondents and found some interesting differences among ethnic, age and gender groups.
Technology
For example, 52% agree that technology and social media have a negative impact on mental health, but when broken out by race, 61% of Whites felt technology had a negative effect, and only 48% of Hispanics thought it did.
While technology has helped us keep in touch with friends and family in faraway places, it appears to have degraded our ability to connect in person. Staying connected online is a double-edged sword since the same news feed that brings us pictures of the grandkids and fluffy kittens also feeds us news about the wars in Israel and Ukraine, the dysfunction in Washington, the latest mass shooting and the climate crisis.
Hispanics may have a built-in defense against the isolation technology breeds, owing to their large, multigenerational households, strong social support systems, and tendency to use social media to stay connected with relatives abroad.
Age and Gender
When asked how individuals rate their mental health, men rate it higher than women by 11 percentage points, and Baby Boomers rank it highest at 83%, saying it’s good or excellent vs. 57% of Gen Z saying the same.
Gen Z spends the most amount of time on social media, so the notion that social media negatively affects mental health appears to be correlated. Unfortunately, Gen Z is also the generation that’s least comfortable discussing mental health concerns with healthcare professionals. Only 40% of them state they’re comfortable discussing their issues with a professional compared to 60% of Millennials and 65% of Boomers.
Race Affects Attitudes
As seen in previous research conducted by ThinkNow, Asian Americans lag other groups when it comes to awareness of mental health issues. Twenty-four percent of Asian Americans believe that having a mental health issue is a sign of weakness compared to the 16% average for all groups. Asians are also considerably less likely to be aware of mental health services in their communities (42% vs. 55%) and most likely to seek out information on social media (51% vs. 35%).
AI Trends in Creative Operations 2024 by Artwork Flow.pdfmarketingartwork
This article is all about what AI trends will emerge in the field of creative operations in 2024. All the marketers and brand builders should be aware of these trends for their further use and save themselves some time!
A report by thenetworkone and Kurio.
The contributing experts and agencies are (in an alphabetical order): Sylwia Rytel, Social Media Supervisor, 180heartbeats + JUNG v MATT (PL), Sharlene Jenner, Vice President - Director of Engagement Strategy, Abelson Taylor (USA), Alex Casanovas, Digital Director, Atrevia (ES), Dora Beilin, Senior Social Strategist, Barrett Hoffher (USA), Min Seo, Campaign Director, Brand New Agency (KR), Deshé M. Gully, Associate Strategist, Day One Agency (USA), Francesca Trevisan, Strategist, Different (IT), Trevor Crossman, CX and Digital Transformation Director; Olivia Hussey, Strategic Planner; Simi Srinarula, Social Media Manager, The Hallway (AUS), James Hebbert, Managing Director, Hylink (CN / UK), Mundy Álvarez, Planning Director; Pedro Rojas, Social Media Manager; Pancho González, CCO, Inbrax (CH), Oana Oprea, Head of Digital Planning, Jam Session Agency (RO), Amy Bottrill, Social Account Director, Launch (UK), Gaby Arriaga, Founder, Leonardo1452 (MX), Shantesh S Row, Creative Director, Liwa (UAE), Rajesh Mehta, Chief Strategy Officer; Dhruv Gaur, Digital Planning Lead; Leonie Mergulhao, Account Supervisor - Social Media & PR, Medulla (IN), Aurelija Plioplytė, Head of Digital & Social, Not Perfect (LI), Daiana Khaidargaliyeva, Account Manager, Osaka Labs (UK / USA), Stefanie Söhnchen, Vice President Digital, PIABO Communications (DE), Elisabeth Winiartati, Managing Consultant, Head of Global Integrated Communications; Lydia Aprina, Account Manager, Integrated Marketing and Communications; Nita Prabowo, Account Manager, Integrated Marketing and Communications; Okhi, Web Developer, PNTR Group (ID), Kei Obusan, Insights Director; Daffi Ranandi, Insights Manager, Radarr (SG), Gautam Reghunath, Co-founder & CEO, Talented (IN), Donagh Humphreys, Head of Social and Digital Innovation, THINKHOUSE (IRE), Sarah Yim, Strategy Director, Zulu Alpha Kilo (CA).
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
The search marketing landscape is evolving rapidly with new technologies, and professionals, like you, rely on innovative paid search strategies to meet changing demands.
It’s important that you’re ready to implement new strategies in 2024.
Check this out and learn the top trends in paid search advertising that are expected to gain traction, so you can drive higher ROI more efficiently in 2024.
You’ll learn:
- The latest trends in AI and automation, and what this means for an evolving paid search ecosystem.
- New developments in privacy and data regulation.
- Emerging ad formats that are expected to make an impact next year.
Watch Sreekant Lanka from iQuanti and Irina Klein from OneMain Financial as they dive into the future of paid search and explore the trends, strategies, and technologies that will shape the search marketing landscape.
If you’re looking to assess your paid search strategy and design an industry-aligned plan for 2024, then this webinar is for you.
5 Public speaking tips from TED - Visualized summarySpeakerHub
From their humble beginnings in 1984, TED has grown into the world’s most powerful amplifier for speakers and thought-leaders to share their ideas. They have over 2,400 filmed talks (not including the 30,000+ TEDx videos) freely available online, and have hosted over 17,500 events around the world.
With over one billion views in a year, it’s no wonder that so many speakers are looking to TED for ideas on how to share their message more effectively.
The article “5 Public-Speaking Tips TED Gives Its Speakers”, by Carmine Gallo for Forbes, gives speakers five practical ways to connect with their audience, and effectively share their ideas on stage.
Whether you are gearing up to get on a TED stage yourself, or just want to master the skills that so many of their speakers possess, these tips and quotes from Chris Anderson, the TED Talks Curator, will encourage you to make the most impactful impression on your audience.
See the full article and more summaries like this on SpeakerHub here: https://speakerhub.com/blog/5-presentation-tips-ted-gives-its-speakers
See the original article on Forbes here:
http://www.forbes.com/forbes/welcome/?toURL=http://www.forbes.com/sites/carminegallo/2016/05/06/5-public-speaking-tips-ted-gives-its-speakers/&refURL=&referrer=#5c07a8221d9b
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
Everyone is in agreement that ChatGPT (and other generative AI tools) will shape the future of work. Yet there is little consensus on exactly how, when, and to what extent this technology will change our world.
Businesses that extract maximum value from ChatGPT will use it as a collaborative tool for everything from brainstorming to technical maintenance.
For individuals, now is the time to pinpoint the skills the future professional will need to thrive in the AI age.
Check out this presentation to understand what ChatGPT is, how it will shape the future of work, and how you can prepare to take advantage.
A brief introduction to DataScience with explaining of the concepts, algorithms, machine learning, supervised and unsupervised learning, clustering, statistics, data preprocessing, real-world applications etc.
It's part of a Data Science Corner Campaign where I will be discussing the fundamentals of DataScience, AIML, Statistics etc.
Time Management & Productivity - Best PracticesVit Horky
Here's my presentation on by proven best practices how to manage your work time effectively and how to improve your productivity. It includes practical tips and how to use tools such as Slack, Google Apps, Hubspot, Google Calendar, Gmail and others.
The six step guide to practical project managementMindGenius
The six step guide to practical project management
If you think managing projects is too difficult, think again.
We’ve stripped back project management processes to the
basics – to make it quicker and easier, without sacrificing
the vital ingredients for success.
“If you’re looking for some real-world guidance, then The Six Step Guide to Practical Project Management will help.”
Dr Andrew Makar, Tactical Project Management
2. agenda
● Big Picture
W jakiej kondycji jest moja baza danych?
Gdzie szukać potencjalnych problemów?
● Odpowiednio zaprojektowana struktura
Jak projektować tabele?
Jakich typów danych używać?
● Zmiany struktury bazy
Jak zmienić strukturę danych w dużych tabelach (np 300GB)?
2
4. od czego zacząć?
● MySQL internals
● information_schema
● Percona Toolkit
● pt-duplicate-key-checker
● pt-mysql-summary
4
5. information_schema
● Baza danych
● Zawiera widoki (readonly)
● Zapewnia dostęp do metadanych o:
● tabelach
● kolumnach
● indeksach
● triggerach
● widokach
● itp.
● Można wykonywać na niej standardowe SQLki
5
6. information_schema - overview
SELECT engine,
row_format,
table_name,
concat(round(table_rows/1000000,2),'M') rows,
concat(round(data_length/(1024*1024*1024),2),'G') data,
concat(round(index_length/(1024*1024*1024),2),'G') idx,
concat(round((data_length+index_length)/(1024*1024*1024),2),
'G') total_size,
round(index_length/data_length,2) idxfrac
FROM information_schema.TABLES
WHERE table_schema IN ("your_database_name")
GROUP BY table_name, table_schema, engine
ORDER BY data_length+index_length DESC LIMIT 10;
6
8. engine
Pożądanym enginem jest InnoDB
W bardzo specyficznych warunkach może się nam opłacać utrzymywać inne
engine (np. Archive, RocksDB, TokuDB)
… WHERE
table_schema IN ("your_database_name") AND
Engine != “InnoDB” …
ALTER TABLE table_name ENGINE=InnoDB
8
9. row format
W przypadku InnoDB praktycznie zawsze chcemy mieć skompresowane dane
Kompresja oznacza, że mniej danych jest przesyłanych pomiędzy dyskiem a
pamięcią/procesorem
● Mniej zajętej przestrzeni na dysku
● Mniej zajętej przestrzeni w pamięci RAM (buffer pool)
● Większa utylizacja procesora (narzut na kompresję/dekompresję danych)
… WHERE
table_schema IN ("your_database_name") AND
row_format != “Compressed” …
ALTER TABLE table_name ENGINE=InnoDB ROW_FORMAT=COMPRESSED
9
10. rows, data size, index size, total size
rows - ilość rekordów
data size - wielkość danych w tabeli*
idx size - wielkość indeksów w tabeli
total size - sumaryczna wielkość tabeli (dane + indeksy)
* w przypadku InnoDB Primary Key jest klastrowany, więc jego wielkość liczy się
do wielkości danych, a nie indeksów
10
11. rows, data size, index size, total size
Wielkość (rekordy, bajty) pokazuje na jakich tabelach powinniśmy się skupić.
Warto rozważyć:
● Archiwizację
● Partycjonowanie
● Retencję danych
11
12. index fraction
Stosunek wielkości indeksów do danych
Im mniejszy tym lepiej (oczywiście zakładając istnienie wszystkich potrzebnych
do poprawnego działania indeksów)
Duża wartość może oznaczać niepoprawną strukturę
● Część indeksów może być niepotrzebna/nie używana
● Część indeksów może być zduplikowana
● Primary key mógł zostać wybrany nieoptymalnie (np. VARCHAR) + duża ilość secondary keys
… ORDER BY
idxfrac DESC …
12
14. information_schema - primary key
SELECT
engine,
table_name
FROM
TABLES AS t
WHERE
NOT EXISTS(SELECT null FROM COLUMNS AS c WHERE
c.table_name = t.table_name AND
c.table_schema=t.table_schema AND
c.table_schema=’your_database_name’AND c.COLUMN_KEY='PRI'
LIMIT 1) AND t.table_schema=’your_database_name’
14
16. information_schema - primary key
W InnoDB zawsze powinniśmy posiadać PRIMARY KEY
● Primary Key jest klastrowany
● Jeśli nie zdefiniujemy Primary Key to InnoDB sam doda “implicite” Primary Key - w praktyce nie ma
możliwości zbudowania tabeli InnoDB bez PRIMARY KEY, tylko czasem będzie “ukryty” i nie
będziemy mieli do niego dostępu
● PRIMARY KEY ma wpływ na wielkość/budowę SECONDARY INDEX
Jeśli korzystamy z innego engine’u (np. MyISAM) może się okazać, że PRIMARY KEY faktycznie nie
jest potrzebny, ale jest to rzadkość
16
17. information_schema - auto increment
SELECT
TABLES.table_name,
column_name,
column_type,
auto_increment,
CASE WHEN data_type='int' AND column_type NOT LIKE '%unsigned%' THEN
auto_increment/2147483647 * 100 WHEN data_type='int' AND column_type LIKE '%unsigned%' THEN
auto_increment/4294967295 * 100 END AS capacity
FROM
information_schema.TABLES
JOIN information_schema.COLUMNS ON TABLES.table_name = COLUMNS.table_name AND
TABLES.table_schema = COLUMNS.table_schema
WHERE
TABLES.table_schema like ‘your_database_name’ AND
auto_increment IS NOT NULL AND
COLUMNS.extra='auto_increment'
ORDER BY capacity
17
18. information_schema - auto increment
Tabele w których kończy się zakres integer oznaczone jako auto increment:
+-----------------------------+-----------------------+------------------+----------------+----------+
| table_name | column_name | column_type | auto_increment | capacity |
+-----------------------------+-----------------------+------------------+----------------+----------+
| blocking_information | id | int(10) | 200771026 | 9.3491 |
| link_events | id | int(10) unsigned | 413384049 | 9.6248 |
| user_agent_to_subscribers | id | int(11) | 1908563772 | 88.8744 |
+-----------------------------+-----------------------+------------------+----------------+----------+
18
19. information_schema - auto increment
Jaki typ pola będzie najlepszy dla pola oznaczonego jako auto increment ?
● INT - wystarczy na długi czas (4 bajty - 2^32 wartości)
● BIGINT - gdy nie starcza standardowego INT (8 bajtów - 2^64 wartości)
● UNSIGNED - nie ma żadnych podstaw do tego aby mieć ujemne wartości w polu auto increment
więc zawsze stosujmy pole UNSIGNED
19
21. fragmentacja danych
InnoDB Compression Issue - jak powstają “wolne” przestrzenie?
● Dane trzymane są w jednostkach zwanych Page (8kB - 16kB)
● Jeśli mamy dużo operacji UPDATE to dane wcześniej mieszczące się w jednym Page, mogą się
powiększyć i nie zmieścić się w pierwotne miejsce, wtedy następuje ich przeniesienie do nowego
Page, niestety w starym pozostaje “wolne” miejsce
● Jeśli mamy dużo “losowych” operacji DELETE powstają “wolne” miejsca
● Odzyskanie miejsca następuje dopiero kiedy zajętość danych w Page spadnie poniżej 50%
Jak sobie z tym poradzić?
OPTIMIZE TABLE ‘your_table_name’ / ALTER TABLE ‘your_table_name’,
ENGINE=INNODB
21
22. percona toolkit
Zestaw narzędzi zbudowanych przez Percona
● W sumie ponad 30 narzędzi
● Przydatne dla administratorów/bazodanowców/deweloperów
https://www.percona.com/doc/percona-toolkit/3.0/index.html
22
25. big picture - podsumowanie
Powyższe narzędzia/metody pozwalają zgrubnie określić miejsca w których nasza baza danych ma
problemy ze strukturą
● Pozwala określić największe tabele
● Tabele które mają inny/przestarzały engine
● Tabele bez kompresji danych
● Tabele bez klucza głównego
● Tabele ze zduplikowanymi kluczami
● Tabele w których dane są mocno zfragmentowane
25
27. Używaj najmniejszych możliwych typów danych
● Oczywiste… Ale czy na pewno?
Dlaczego ma to takie znaczenie?
● Wykorzystanie zasobów dyskowych
● Transfer po sieci
● Alokacja pamięci w bufforze
typy danych
27
28. Numeryczne typy danych
● SIGNED / UNSIGNED
● Pole typu status - TINYINT
● Pole typu active / soft delete - TINYINT
● Pole typu gender - ENUM (w rzeczywistości TINYINT) / CHAR(1)
INT vs TINYINT?
● 4 bajty vs 1 bajt
typy danych
28
29. Czasowe typy danych
● Pole typu last_update (bieżące zdarzenia) - TIMESTAMP
● Pole typu birthday (historia) - DATETIME
DATETIME vs TIMESTAMP
● 8 bajtów vs 4 bajty
● TIMESTAMP ma obsługę stref czasowych
typy danych
29
30. Znakowe typy danych
● Pole typu hash / uuid - CHAR
● Pole typu topic / name - VARCHAR
● Nie korzystaj jeśli masz słownik, np x-small, small, medium, large - ENUM
CHAR vs VARCHAR
● CHAR(4) - 4 bajty
● VARCHAR(4) - od 1 do 5 bajtów
● VARCHAR(512) - od 2 do 514 bajtów
typy danych
30
31. Wartość nieznana
● Jeśli pole może mieć nie znaną wartość - NULL
NULL vs NOT NULL
● NULL implementowany jest jako jeden bit
typy danych
31
34. CREATE TABLE `emails` (
`added` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`email` varchar(255) NOT NULL,
`type` tinyint NOT NULL DEFAULT '1',
`source` tinyint NOT NULL DEFAULT '2',
PRIMARY KEY (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=678023341
ROW_FORMAT=COMPRESSED
przykład
34
35. CREATE TABLE `emails` (
`id_emails` INT UNSIGNED NOT NULL AUTO_INCREMENT,
`added` TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
`email` varchar(255) NOT NULL,
`type` tinyint NOT NULL DEFAULT '1',
`source` tinyint NOT NULL DEFAULT '2',
PRIMARY KEY (`id_emails`)
UNIQUE KEY email(`email`)
) ENGINE=InnoDB AUTO_INCREMENT=678023341
ROW_FORMAT=COMPRESSED
przykład
35
36. Twórz najmniej indexów jak to tylko możliwe
Wybieraj najmniejszy PRIMARY KEY jaki jest możliwy
● PRIMARY KEY jest kopiowany do każdego SECONDARY INDEX
● PRIMARY KEY jest kopiowany do każdej tabeli z którą chcemy się łączyć (FOREIGN KEY)
Unikaj “losowego” PRIMARY KEY (np. email, hash)
● INSERT jest rozrzucony po całej tabeli
Index (innodb)
36
39. ALTER TABLE - stara szkoła
Każdy ALTER blokował tabelę
● Brak możliwości wykonania INSERT / UPDATE / DELETE
● Im większa tabela tym dłuższy czas zablokowania
● Można śledzić postęp tylko w przypadku file_per_table=1(za pomocą ls -la)
39
40. ALTER TABLE - fast index creation
Fast Index Creation
● pojawił się w Mysql 5.1 (InnoDB Plugin) lub Mysql 5.5+
● Można tworzyć Secondary Index bez konieczności kopiowania wszystkich danych w tabeli
● Przyspieszenie dodawania/kasowania indeksów.
40
41. ALTER TABLE - Online DDL change
InnoDB online DDL change
● Pierwsza wersja w MySQL 5.5 (podstawowe możliwości)
● Dużo więcej możliwych operacji od MySQL 5.6
● Umożliwia zmianę schematu bez blokowania tabeli
● Ograniczone do pewnych konkretnych typów operacji (np. nie obsługuje FULL TEXT)
● Dostępne tylko dla InnoDB
● Brak zarządzania “throttlingiem”
41
42. Algorithm
● INPLACE - nie wymaga przebudowania tabeli
● COPY - kopiuje dane i przebudowywuje całą tabelę
Lock mode
● EXCLUSIVE - żadne DML nie są możliwe
● SHARED - można z tabeli czytać, nie ma możliwości zrobić UPDATE/INSERT/DELETE
● NONE - nie ma żadnego lock’a na tabelę, można wykonywać dowolne DML
ALTER TABLE `your_database`.`table_name` ADD COLUMN `example` INT, ALGORITHM=INPLACE
ALTER TABLE `your_database`.`table_name` ENGINE=INNODB, ALGORITHM=COPY, LOCK=SHARED
ALTER TABLE - Online DDL change
42
43. Podczas ALTER’a tabela nie jest modyfikowana, ale za to mamy dodatkowy,
tymczasowy log file gdzie zapisywane są wszystkie zmiany dokonywane w
czasie ALTER’a na tabeli (INSERT/UPDATE/DELETE)
Wielkość log file definiuje innodb_online_alter_log_max_size
● Domyślnie 128MB
● Jeśli zostanie zapełniony, ALTER się nie powiedzie
Długo trwający ALTER może będzie powodował replication lag - najpierw w
całości musi wykonać się na masterze, potem na slave
ALTER TABLE - Online DDL change
43
44. Jak wygląda procedura OSC?
● Tworzymy nową tabelę z identyczną strukturą jak pierwotna
● Wykonujemy polecenia ALTER TABLE na “nowej” / pustej tabeli
● Musimy zadbać o synchronizację DML (triggers / binary log)
● Kopiujemy dane do nowej tabeli
● Zamieniamy tabele poleceniem RENAME TABLE
Online Schema Change Tools
44
45. Stworzone przez Percona
Udostępnione jako część pakietu Percona Toolkit
Open Source
Wykorzystuje TRIGGERY do synchronizacji (synchroniczna)
Powoduje większe obciążenie na bazie (z powodu TRIGGERÓW)
Nie mamy pełnego wpływu na “throttling”
pt-online-schema-change
45
47. Znane problemy / ograniczenia:
● Wymagany PRIMARY KEY / UNIQUE KEY
● Nazwa FOREIGN KEY ulegnie zmianie po alterze
● Na tabeli nie mogą być założone TRIGGERY
● Migracji nie można zapauzować
pt-online-schema-change
47
48. Stworzone przez GitHub
Open Source
Do synchronizacji wykorzystuje binloga (asynchroniczna)
Nie zakłada TRIGGERÓW na tabeli
Mamy pełny wpływ na “throttling”
Dynamicznie możemy zmieniać parametry “throttlingu”
Kontrolowany “cutover” dla nowych, zalterowanych tabel
gh-ost
48
50. Znane problemy / ograniczenia:
⋅ Nie obsługuje aktywnej replikacji MASTER - MASTER
gh-ost
50
51. osc tips
screen - w razie rozłączenia z serwerem
replikacja - patrz i reaguj
DROP INDEX - wbudowany ALTER zrobi to “inplace”, nie rób tego gh-ost’em ani
ptosc
defragmentacja - --alter=”ENGINE=INNODB”
przerwanie migracji - sprawdź czy nie zostały “nowe” tabele lub triggery
51
52. osc - długo jeszcze?
gh-ost i ptosc pokazują progress na stdout (ale nie zawsze dokładnie)
mysql> show table status like ‘%your_table%’;
ls -alh /data/schema/*your_table*.ibd
mysql> select max(id) from your_table;
mysql> show full processlist; - żeby znaleźć aktualne ID PK
52
53. osc - uruchom i zapomnij...
Każda migracja wprowadza obciążenie serwera bazodanowego
Warto mieć zewnętrzne narzędzie które monitoruje średni czas odpowiedzi
aplikacji
Nie uruchamiaj w piątek wieczorem (chyba, że nie masz ochoty wrócić do
domu…)
53